CFE-3Merge branch 'feature/CFE-3_implementation_role_permission' into 'develop'

This commit is contained in:
AmirHossein Mahmoodi
2023-10-30 10:34:53 +00:00
5 changed files with 47 additions and 6 deletions

View File

@@ -1,7 +1,9 @@
import useSWR from 'swr'
import {GET_SIDEBAR_NOTIFICATION} from "@/core/data/apiRoutes";
import useRequest from "@/lib/app/hooks/useRequest";
const isNotificationEnabled = process.env.NEXT_HAS_NOTIFICATION === "true";
const GLOBAL_HAS_VALUE = process.env.NEXT_PUBLIC_HAS_VALUE;
const hasPermissionsValue = GLOBAL_HAS_VALUE ? JSON.parse(GLOBAL_HAS_VALUE) : [];
const isNotificationEnabled = hasPermissionsValue.includes("NEXT_PUBLIC_HAS_NOTIFICATION");
const useNotification = () => {