CFE-3 implementation permission

This commit is contained in:
Yasiu1376
2023-10-30 12:06:21 +03:30
parent 579dbbcea6
commit 4bbdc61da2
4 changed files with 43 additions and 4 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 = () => {