diff --git a/apps/sensenet/src/components/content-list/contenttype-list.tsx b/apps/sensenet/src/components/content-list/contenttype-list.tsx index f440e0c16..3f5594daf 100644 --- a/apps/sensenet/src/components/content-list/contenttype-list.tsx +++ b/apps/sensenet/src/components/content-list/contenttype-list.tsx @@ -1,12 +1,21 @@ import React, { lazy, useState } from 'react' import { PATHS } from '../../application-paths' import { Switch } from '@sensenet/controls-react' +import { useRepository } from '@sensenet/hooks-react' const ContentComponent = lazy(() => import(/* webpackChunkName: "content" */ '../content')) const ContentTypeList: React.FC = () => { + const repository = useRepository() const [showHiddenTypes, setShowHiddenTypes] = useState(false) + const categoryField = repository.schemas.getFieldTypeByName('Categories') + const isCategoryFieldAvailable = categoryField !== undefined + const renderBeforeGrid = () => { + if (!isCategoryFieldAvailable) { + return <> + } + return (