This commit is contained in:
Rao 2025-03-03 09:18:32 +08:00
parent 5bc3303e94
commit 60f14bf858
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ function useGetTaxonomy({ type }): GetTaxonomyProps {
const categories = useMemo(() => { const categories = useMemo(() => {
const allCategories = isLoading const allCategories = isLoading
? [] ? []
: data?.map((course) => course.name); : data?.filter(c=>!c.deletedAt)?.map((course) => course.name);
return [...Array.from(new Set(allCategories))]; return [...Array.from(new Set(allCategories))];
}, [data]); }, [data]);
return { categories, isLoading }; return { categories, isLoading };