import { useEnvironmentId } from '@/react/hooks/useEnvironmentId'; import { isBE } from '@/react/portainer/feature-flags/feature-flags.service'; import { useUnauthorizedRedirect } from '@/react/hooks/useUnauthorizedRedirect'; import { PageHeader } from '@@/PageHeader'; import { CreateNamespaceForm } from './CreateNamespaceForm'; export function CreateNamespaceView() { const environmentId = useEnvironmentId(); useUnauthorizedRedirect( { authorizations: 'K8sResourcePoolsW', forceEnvironmentId: environmentId, adminOnlyCE: !isBE, }, { to: 'kubernetes.resourcePools', params: { id: environmentId, }, } ); return (
); }