balibabu
feat: prevent the user from entering the knowledge base if he is not logged in (#45)
04aba1b
| import authorizationUtil from '@/utils/authorizationUtil'; | |
| import { useState } from 'react'; | |
| export const useAuth = () => { | |
| const [isLogin, setIsLogin] = useState( | |
| () => !!authorizationUtil.getAuthorization(), | |
| ); | |
| return { isLogin }; | |
| }; | |