mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
made lab use provider and context
This commit is contained in:
parent
cb314e9f8d
commit
96f1529f2b
9 changed files with 129 additions and 56 deletions
|
@ -2,13 +2,13 @@ import React, { FC } from 'react';
|
|||
import { URLS } from '~/constants/urls';
|
||||
import { ErrorNotFound } from '~/containers/pages/ErrorNotFound';
|
||||
import { Redirect, Route, Switch, useLocation } from 'react-router';
|
||||
import { LabLayout } from '~/layouts/LabLayout';
|
||||
import { useShallowSelect } from '~/utils/hooks/useShallowSelect';
|
||||
import { selectAuthUser } from '~/redux/auth/selectors';
|
||||
import { ProfileLayout } from '~/layouts/ProfileLayout';
|
||||
import FlowPage from '~/pages';
|
||||
import BorisPage from '~/pages/boris';
|
||||
import NodePage from '~/pages/node/[id]';
|
||||
import LabPage from '~/pages/lab';
|
||||
|
||||
interface IProps {}
|
||||
|
||||
|
@ -23,7 +23,7 @@ const MainRouter: FC<IProps> = () => {
|
|||
<Route path={URLS.ERRORS.NOT_FOUND} component={ErrorNotFound} />
|
||||
<Route path={URLS.PROFILE_PAGE(':username')} component={ProfileLayout} />
|
||||
|
||||
{is_user && <Route path={URLS.LAB} component={LabLayout} />}
|
||||
{is_user && <Route path={URLS.LAB} component={LabPage} />}
|
||||
|
||||
<Route path={URLS.BASE} component={FlowPage} />
|
||||
<Redirect to="/" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue