fix animations

This commit is contained in:
2020-10-16 12:44:22 +00:00
committed by Stepan Usatiuk
parent 8bd57fcf9e
commit 0dcb5e2340

View File

@@ -4,12 +4,16 @@ import { AuthScreen } from "~Auth/AuthScreen";
import { requireAuth } from "~Auth/AuthWrapper";
import { Home } from "~Home/Home";
// Somehow, if we do it like this then App doesn't rerender every time
// the route changes, and animations work
const protectedHome = requireAuth(Home);
export const AppComponent: React.FunctionComponent<RouteComponentProps> = () => {
return (
<Switch>
<Route path="/signup" component={AuthScreen} />,
<Route path="/login" component={AuthScreen} />,
<Route path="/" component={requireAuth(Home)} />,
<Route path="/" component={protectedHome} />,
</Switch>
);
};