mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
167c1a8aad
102 changed files with 1560 additions and 385 deletions
|
@ -8,4 +8,8 @@
|
|||
@include tablet {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media (max-width: $content_width + $gap * 4) {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,10 +6,14 @@ import { BorisLayout } from '~/containers/node/BorisLayout';
|
|||
import { ErrorNotFound } from '~/containers/pages/ErrorNotFound';
|
||||
import { ProfilePage } from '~/containers/profile/ProfilePage';
|
||||
import { Redirect, Route, Switch, useLocation } from 'react-router';
|
||||
import { LabLayout } from '~/containers/lab/LabLayout';
|
||||
import { useShallowSelect } from '~/utils/hooks/useShallowSelect';
|
||||
import { selectAuthUser } from '~/redux/auth/selectors';
|
||||
|
||||
interface IProps {}
|
||||
|
||||
const MainRouter: FC<IProps> = () => {
|
||||
const { is_user } = useShallowSelect(selectAuthUser);
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
|
@ -20,6 +24,12 @@ const MainRouter: FC<IProps> = () => {
|
|||
<Route path={URLS.ERRORS.NOT_FOUND} component={ErrorNotFound} />
|
||||
<Route path={URLS.PROFILE_PAGE(':username')} component={ProfilePage} />
|
||||
|
||||
{is_user && (
|
||||
<>
|
||||
<Route exact path={URLS.LAB} component={LabLayout} />
|
||||
</>
|
||||
)}
|
||||
|
||||
<Redirect to="/" />
|
||||
</Switch>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue