From 156b12311d3c7cd4ac31f10ee1326140e7707f0b Mon Sep 17 00:00:00 2001 From: Dmytro Melnyshyn Date: Tue, 26 Nov 2024 09:32:05 +0200 Subject: [PATCH] change variable names --- .../useUserTenantPermissions.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/queries/useUserTenantPermissions/useUserTenantPermissions.js b/src/queries/useUserTenantPermissions/useUserTenantPermissions.js index 66e322d7..389351ed 100644 --- a/src/queries/useUserTenantPermissions/useUserTenantPermissions.js +++ b/src/queries/useUserTenantPermissions/useUserTenantPermissions.js @@ -49,12 +49,12 @@ const useUserTenantPermissions = ( }, ); - const centralTenantPermissions = data.permissionNames || INITIAL_DATA; + const tenantPermissions = data.permissionNames || INITIAL_DATA; - const flattenCentralTenantPermissions = useMemo(() => { + const flattenTenantPermissions = useMemo(() => { const permSet = new Set(); - centralTenantPermissions.forEach(perm => { + tenantPermissions.forEach(perm => { permSet.add(perm.permissionName); perm.subPermissions?.forEach(subPermission => { @@ -63,12 +63,12 @@ const useUserTenantPermissions = ( }); return permSet; - }, [centralTenantPermissions]); + }, [tenantPermissions]); return ({ isFetching, isLoading, - userPermissions: flattenCentralTenantPermissions, + userPermissions: flattenTenantPermissions, totalRecords: data.totalRecords, }); };