1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

fixed some scroll issues

This commit is contained in:
Fedor Katurov 2020-10-26 11:47:22 +07:00
parent 58676ac1d5
commit 677dce9721
3 changed files with 25 additions and 10 deletions

View file

@ -15,17 +15,22 @@ const MainRouter: FC<IProps> = () => {
return (
<TransitionGroup>
<CSSTransition key={location.key} classNames="fade" timeout={500}>
<Switch location={location}>
<Route exact path={URLS.BASE} component={FlowLayout} />
<Route path={URLS.NODE_URL(':id')} component={NodeLayout} />
<Route path={URLS.BORIS} component={BorisLayout} />
<Route path={URLS.ERRORS.NOT_FOUND} component={ErrorNotFound} />
<Route path={URLS.PROFILE_PAGE(':username')} component={ProfilePage} />
{
// disabled for scroll restoration
// <CSSTransition key={location.key} classNames="fade" timeout={500}>
}
<Switch location={location}>
<Route exact path={URLS.BASE} component={FlowLayout} />
<Route path={URLS.NODE_URL(':id')} component={NodeLayout} />
<Route path={URLS.BORIS} component={BorisLayout} />
<Route path={URLS.ERRORS.NOT_FOUND} component={ErrorNotFound} />
<Route path={URLS.PROFILE_PAGE(':username')} component={ProfilePage} />
<Redirect to="/" />
</Switch>
</CSSTransition>
<Redirect to="/" />
</Switch>
{
// </CSSTransition>
}
</TransitionGroup>
);
};