1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

refactored node page

This commit is contained in:
Fedor Katurov 2021-11-06 20:32:00 +07:00
parent 0b77e87778
commit b44266437d
5 changed files with 88 additions and 40 deletions

View file

@ -1,6 +1,5 @@
import React, { FC } from 'react';
import { URLS } from '~/constants/urls';
import { NodeLayout } from '~/layouts/NodeLayout';
import { BorisLayout } from '~/layouts/BorisLayout';
import { ErrorNotFound } from '~/containers/pages/ErrorNotFound';
import { Redirect, Route, Switch, useLocation } from 'react-router';
@ -9,6 +8,7 @@ import { useShallowSelect } from '~/utils/hooks/useShallowSelect';
import { selectAuthUser } from '~/redux/auth/selectors';
import { ProfileLayout } from '~/layouts/ProfileLayout';
import FlowPage from '~/pages';
import NodePage from '~/pages/node/[id]';
interface IProps {}
@ -18,7 +18,7 @@ const MainRouter: FC<IProps> = () => {
return (
<Switch location={location}>
<Route path={URLS.NODE_URL(':id')} component={NodeLayout} />
<Route path={URLS.NODE_URL(':id')} component={NodePage} />
<Route path={URLS.BORIS} component={BorisLayout} />
<Route path={URLS.ERRORS.NOT_FOUND} component={ErrorNotFound} />
<Route path={URLS.PROFILE_PAGE(':username')} component={ProfileLayout} />