Commit 98c380e9 authored by Sumaiyya Burney's avatar Sumaiyya Burney

Fixes routing

parent 7fde570f
...@@ -14,14 +14,12 @@ export default function AuthRoute({children, ...rest}) { ...@@ -14,14 +14,12 @@ export default function AuthRoute({children, ...rest}) {
render={({ location }) => { render={({ location }) => {
if (isLoggedIn) { if (isLoggedIn) {
if (location.pathname === "/login") { if (location.pathname === "/login") {
// return <Redirect to="/" />; return <Redirect to="/" />;
return children;
} else { } else {
return children; return children;
} }
} else if (location.pathname !== "/login") { } else if (location.pathname !== "/login") {
// return <Redirect to="/login" />; return <Redirect to="/login" />;
return children;
} }
return children; return children;
}} }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment