redirect unauth to login
This commit is contained in:
parent
94ab5c3d8f
commit
dc4133a705
@ -36,12 +36,12 @@ const App: React.FC = () => {
|
|||||||
{/* Public only routes */}
|
{/* Public only routes */}
|
||||||
{
|
{
|
||||||
!isAuth && [
|
!isAuth && [
|
||||||
<Route path="/login" exact key={1} >
|
<Route path="/login" exact key={null} >
|
||||||
<Login onLogin={()=>{
|
<Login onLogin={()=>{
|
||||||
setIsAuth(true)
|
setIsAuth(true)
|
||||||
}} />
|
}} />
|
||||||
</Route>,
|
</Route>,
|
||||||
<Redirect from="/f/" to="/login" key={2} />
|
<Redirect from="*" to="/login" key={null} />
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user