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

Fixes routing

parent 7fde570f
......@@ -14,14 +14,12 @@ export default function AuthRoute({children, ...rest}) {
render={({ location }) => {
if (isLoggedIn) {
if (location.pathname === "/login") {
// return <Redirect to="/" />;
return children;
return <Redirect to="/" />;
} else {
return children;
}
} else if (location.pathname !== "/login") {
// return <Redirect to="/login" />;
return children;
return <Redirect to="/login" />;
}
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