mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
refactor(namespace): migrate namespace edit to react [r8s-125] (#38)
This commit is contained in:
parent
40c7742e46
commit
ce7e0d8d60
108 changed files with 3183 additions and 2194 deletions
|
@ -4,10 +4,11 @@ import { PortainerNamespace } from '../types';
|
|||
|
||||
import { useNamespaceQuery } from './useNamespaceQuery';
|
||||
|
||||
export function useIsSystemNamespace(namespace: string) {
|
||||
export function useIsSystemNamespace(namespace: string, enabled = true) {
|
||||
const envId = useEnvironmentId();
|
||||
const query = useNamespaceQuery(envId, namespace, {
|
||||
select: (namespace) => namespace.IsSystem,
|
||||
enabled,
|
||||
});
|
||||
|
||||
return !!query.data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue