Sfoglia il codice sorgente

add isPrimaryLoggedIn

master
Anna Ho 2 anni fa
parent
commit
d756c0f61c
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. +5
    -0
      src/utils/Utils.js

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

@@ -62,6 +62,11 @@ export const isAdminLoggedIn = () =>{
if (localStorage.getItem('userData') != null){ if (localStorage.getItem('userData') != null){
return JSON.parse(localStorage.getItem('userData')).role === 'admin' 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 ** This function is used for demo purpose route navigation


Caricamento…
Annulla
Salva