diff --git a/app/Features/CategoryTree.php b/app/Features/CategoryTree.php deleted file mode 100644 index 3c465838..00000000 --- a/app/Features/CategoryTree.php +++ /dev/null @@ -1,23 +0,0 @@ - $categories, - 'categoryTreeEnabled' => Feature::for(auth()->user())->active(CategoryTreeFeature::class), ]); } diff --git a/resources/js/components/categories/parent-category-field.tsx b/resources/js/components/categories/parent-category-field.tsx index 6186bc40..954bef91 100644 --- a/resources/js/components/categories/parent-category-field.tsx +++ b/resources/js/components/categories/parent-category-field.tsx @@ -5,7 +5,6 @@ import { getDescendantIds } from '@/lib/category-tree'; import { type Category } from '@/types/category'; import { UUID } from '@/types/uuid'; import { __ } from '@/utils/i18n'; -import { usePage } from '@inertiajs/react'; import { useMemo } from 'react'; interface ParentCategoryFieldProps { @@ -24,10 +23,6 @@ export function ParentCategoryField({ excludeId, error, }: ParentCategoryFieldProps) { - const enabled = - usePage<{ categoryTreeEnabled?: boolean }>().props - .categoryTreeEnabled ?? false; - const byId = useMemo( () => new Map(categories.map((c) => [c.id, c])), [categories], @@ -59,10 +54,6 @@ export function ParentCategoryField({ ); }, [categories, excludeId, byId]); - if (!enabled) { - return null; - } - return (