Ver a proveniência

add isPrimaryLoggedIn

master
Anna Ho há 2 anos
ascendente
cometimento
d756c0f61c
1 ficheiros alterados com 5 adições e 0 eliminações
  1. +5
    -0
      src/utils/Utils.js

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

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


Carregando…
Cancelar
Guardar