From d756c0f61c407c3f5a849047671b9760cbdd31ef Mon Sep 17 00:00:00 2001 From: anna Date: Thu, 7 Sep 2023 11:34:05 +0800 Subject: [PATCH] add isPrimaryLoggedIn --- src/utils/Utils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 9d648ca..a4f9f9c 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -62,6 +62,11 @@ export const isAdminLoggedIn = () =>{ if (localStorage.getItem('userData') != null){ return JSON.parse(localStorage.getItem('userData')).role === 'admin' } +} +export const isPrimaryLoggedIn = () =>{ + if (localStorage.getItem('userData') != null){ + return JSON.parse(localStorage.getItem('userData')).role === 'primary' + } } /** ** This function is used for demo purpose route navigation