mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-15 06:12:18 +00:00
fix filter for add category dropdown
This commit is contained in:
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)}
|
||||
|
||||
Reference in new issue
Block a user