Fix routing

This commit is contained in:
Spectralitree
2020-12-09 10:23:21 +01:00
parent d1c3199363
commit 9e4a6bc1ac
2 changed files with 3 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ export default function App() {
localStorage.setItem('user', JSON.stringify(data));
setIsSubmit(true);
setIsLoading(false);
history.push("/dash");
history.push("/pk-webs/dash");
})
.catch (error => {
console.log(error);
@@ -64,7 +64,7 @@ export default function App() {
<Navigation isSubmit={isSubmit} setIsSubmit={setIsSubmit} />
<BS.Container>
<Switch>
<Route path="/dash" >
<Route path="/pk-webs/dash" >
{ !localStorage.getItem('token') || isInvalid ? <Redirect to="/pk-webs"/> : <Dash/>
}
</Route>