diff --git a/src/views/nads/list/NetworkAttachmentDefinitionList.tsx b/src/views/nads/list/NetworkAttachmentDefinitionList.tsx index 4b9334c5..75075c56 100644 --- a/src/views/nads/list/NetworkAttachmentDefinitionList.tsx +++ b/src/views/nads/list/NetworkAttachmentDefinitionList.tsx @@ -49,6 +49,7 @@ const NetworkAttachmentDefinitionList: FC const [canCreateNAD] = useAccessReview({ group: NetworkAttachmentDefinitionModel.apiGroup, + namespace, resource: NetworkAttachmentDefinitionModel.plural, verb: 'create' as K8sVerb, }); @@ -91,7 +92,7 @@ const NetworkAttachmentDefinitionList: FC columns={columns} data={filteredData} - EmptyMsg={() => } + EmptyMsg={() => } loaded={loaded} loadError={loadError} Row={NADsRow} diff --git a/src/views/nads/list/components/NADListEmpty/NADListEmpty.tsx b/src/views/nads/list/components/NADListEmpty/NADListEmpty.tsx index afc6ff3a..b48b663e 100644 --- a/src/views/nads/list/components/NADListEmpty/NADListEmpty.tsx +++ b/src/views/nads/list/components/NADListEmpty/NADListEmpty.tsx @@ -20,10 +20,11 @@ import { QuickStartModel } from '@utils/models'; import { resourcePathFromModel } from '@utils/resources/shared'; type NADListEmptyProps = { + canCreateNAD?: boolean; namespace: string; }; -const NADListEmpty: FC = ({ namespace }) => { +const NADListEmpty: FC = ({ canCreateNAD = true, namespace }) => { const navigate = useNavigate(); const { t } = useNetworkingTranslation(); @@ -43,15 +44,17 @@ const NADListEmpty: FC = ({ namespace }) => { return ( - + {canCreateNAD && ( + + )} {hasQuickStarts && (