improvement: better error messages in frontend

This commit is contained in:
canove
2020-08-27 17:43:22 -03:00
parent 2309349b1d
commit a0dd4ebe80
5 changed files with 67 additions and 49 deletions

View File

@@ -32,11 +32,7 @@ const RouteWrapper = ({ component: Component, isPrivate = false, ...rest }) => {
}
if (isAuth && !isPrivate) {
return (
<Redirect
to={{ pathname: "/dashboard", state: { from: rest.location } }}
/>
);
return <Redirect to={{ pathname: "/", state: { from: rest.location } }} />;
}
return <Route {...rest} component={Component} />;