Procházet zdrojové kódy

add isPrimaryLoggedIn

master
Anna Ho před 2 roky
rodič
revize
d756c0f61c
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. +5
    -0
      src/utils/Utils.js

+ 5
- 0
src/utils/Utils.js Zobrazit soubor

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


Načítá se…
Zrušit
Uložit