Explorar el Código

add isPrimaryLoggedIn

master
Anna Ho hace 2 años
padre
commit
d756c0f61c
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. +5
    -0
      src/utils/Utils.js

+ 5
- 0
src/utils/Utils.js Ver fichero

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


Cargando…
Cancelar
Guardar