redirect unauth to login

This commit is contained in:
Djeeberjr 2021-09-20 15:21:11 +02:00
parent 94ab5c3d8f
commit dc4133a705

View File

@ -36,12 +36,12 @@ const App: React.FC = () => {
{/* Public only routes */}
{
!isAuth && [
<Route path="/login" exact key={1} >
<Route path="/login" exact key={null} >
<Login onLogin={()=>{
setIsAuth(true)
}} />
</Route>,
<Redirect from="/f/" to="/login" key={2} />
<Redirect from="*" to="/login" key={null} />
]
}