isApplicationConfig return boolean
This commit is contained in:
parent
a7f41fd851
commit
62204c76e2
2 changed files with 4 additions and 8 deletions
|
@ -12,10 +12,8 @@ const ClusterTableActionsCell: React.FC<Props> = ({ row }) => {
|
||||||
const { data } = useGetUserInfo();
|
const { data } = useGetUserInfo();
|
||||||
|
|
||||||
const isApplicationConfig = useMemo(() => {
|
const isApplicationConfig = useMemo(() => {
|
||||||
return (
|
return !!data?.userInfo?.permissions.some(
|
||||||
data?.userInfo?.permissions.some(
|
(permission) => permission.resource === ResourceType.APPLICATIONCONFIG
|
||||||
(permission) => permission.resource === ResourceType.APPLICATIONCONFIG
|
|
||||||
) || false
|
|
||||||
);
|
);
|
||||||
}, [data]);
|
}, [data]);
|
||||||
|
|
||||||
|
|
|
@ -65,10 +65,8 @@ const Dashboard: React.FC = () => {
|
||||||
}, [clusters, appInfo.hasDynamicConfig]);
|
}, [clusters, appInfo.hasDynamicConfig]);
|
||||||
|
|
||||||
const isApplicationConfig = useMemo(() => {
|
const isApplicationConfig = useMemo(() => {
|
||||||
return (
|
return !!data?.userInfo?.permissions.some(
|
||||||
data?.userInfo?.permissions.some(
|
(permission) => permission.resource === ResourceType.APPLICATIONCONFIG
|
||||||
(permission) => permission.resource === ResourceType.APPLICATIONCONFIG
|
|
||||||
) || false
|
|
||||||
);
|
);
|
||||||
}, [data]);
|
}, [data]);
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Reference in a new issue