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 isApplicationConfig = useMemo(() => {
|
||||
return (
|
||||
data?.userInfo?.permissions.some(
|
||||
(permission) => permission.resource === ResourceType.APPLICATIONCONFIG
|
||||
) || false
|
||||
return !!data?.userInfo?.permissions.some(
|
||||
(permission) => permission.resource === ResourceType.APPLICATIONCONFIG
|
||||
);
|
||||
}, [data]);
|
||||
|
||||
|
|
|
@ -65,10 +65,8 @@ const Dashboard: React.FC = () => {
|
|||
}, [clusters, appInfo.hasDynamicConfig]);
|
||||
|
||||
const isApplicationConfig = useMemo(() => {
|
||||
return (
|
||||
data?.userInfo?.permissions.some(
|
||||
(permission) => permission.resource === ResourceType.APPLICATIONCONFIG
|
||||
) || false
|
||||
return !!data?.userInfo?.permissions.some(
|
||||
(permission) => permission.resource === ResourceType.APPLICATIONCONFIG
|
||||
);
|
||||
}, [data]);
|
||||
return (
|
||||
|
|
Loading…
Add table
Reference in a new issue