Browse Source

add isPrimaryLoggedIn

master
Anna Ho 2 years ago
parent
commit
d756c0f61c
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/utils/Utils.js

+ 5
- 0
src/utils/Utils.js View File

@@ -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


Loading…
Cancel
Save