fix filter for add category dropdown

This commit is contained in:
Brandon Thomas committed 2021-12-31 04:03:31 -05:00
1 parent 39ef3bbd54
commit a26369ad98
2 files changed
+3 -2

No files matched your search

@@ -143,7 +143,9 @@ function TtsEditCategoriesPage(props: Props) {
}
const addCategoryOptions = allTtsCategories.filter(category => {
return !(assignedCategoryTokens.has(category.category_token));
const alreadyAdded = assignedCategoryTokens.has(category.category_token);
const cannotAdd = !category.can_directly_have_models;
return !alreadyAdded && !cannotAdd;
}).map(category => {
return (
<>
@@ -213,7 +213,6 @@ function TtsModelViewFc(props: Props) {
);
editModelCategoriesButton = (
<>
<br />
<Link
className={"button is-large is-info is-fullwidth"}
to={FrontendUrlConfig.ttsModelEditCategoriesPage(token)}