Kaynağa Gözat

add isPrimaryLoggedIn

master
Anna Ho 2 yıl önce
ebeveyn
işleme
d756c0f61c
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. +5
    -0
      src/utils/Utils.js

+ 5
- 0
src/utils/Utils.js Dosyayı Görüntüle

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


Yükleniyor…
İptal
Kaydet