mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 22:09:41 +02:00
13 lines
353 B
TypeScript
13 lines
353 B
TypeScript
|
import { useEnvironmentId } from '@/react/hooks/useEnvironmentId';
|
||
|
|
||
|
import { useNamespaceQuery } from './useNamespaceQuery';
|
||
|
|
||
|
export function useIsSystemNamespace(namespace: string) {
|
||
|
const envId = useEnvironmentId();
|
||
|
const query = useNamespaceQuery(envId, namespace, {
|
||
|
select: (namespace) => namespace.IsSystem,
|
||
|
});
|
||
|
|
||
|
return !!query.data;
|
||
|
}
|