|
|
|
@ -22,6 +22,7 @@ import DetailRoomEducation from "./_screens/home/detail-room-education"; |
|
|
|
|
import EducationDepartmentHome from "./_screens/home/education-department"; |
|
|
|
|
import { Alert } from "./_components/Alert"; |
|
|
|
|
import OutstandingTeacher from "./_screens/home/outstanding-teacher"; |
|
|
|
|
import { TYPE_DISPATCH } from "./_constants/common"; |
|
|
|
|
|
|
|
|
|
function App() { |
|
|
|
|
const dispatch = useDispatch(); |
|
|
|
@ -44,6 +45,14 @@ function App() { |
|
|
|
|
dispatch(alertActions?.clear()); |
|
|
|
|
}); |
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
if(authentication?.user?.role === "student"||authentication?.user?.role === "parent") |
|
|
|
|
dispatch({ |
|
|
|
|
type: TYPE_DISPATCH.RESET_AUTHENTICATION, |
|
|
|
|
}); |
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div className="rel"> |
|
|
|
|
<div className="loading hide"> |
|
|
|
|