mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
#23 fixed submit button appearance for lab
This commit is contained in:
parent
998a2e305a
commit
ede5dfe17f
15 changed files with 82 additions and 44 deletions
|
@ -1,7 +1,6 @@
|
|||
import React, { FC } from 'react';
|
||||
import styles from './styles.module.scss';
|
||||
import { PlayerBar } from '~/components/bars/PlayerBar';
|
||||
import { SubmitBar } from '~/components/bars/SubmitBar';
|
||||
import { selectUser } from '~/redux/auth/selectors';
|
||||
import { pick } from 'ramda';
|
||||
import { connect } from 'react-redux';
|
||||
|
@ -14,8 +13,6 @@ const BottomContainerUnconnected: FC<IProps> = ({ is_user }) => (
|
|||
<div className={styles.wrap}>
|
||||
<div className={styles.content}>
|
||||
<PlayerBar />
|
||||
|
||||
{is_user && <SubmitBar />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import React, { FC } from 'react';
|
||||
import { URLS } from '~/constants/urls';
|
||||
import { FlowLayout } from '~/containers/flow/FlowLayout';
|
||||
import { NodeLayout } from '~/containers/node/NodeLayout';
|
||||
import { BorisLayout } from '~/containers/node/BorisLayout';
|
||||
import { FlowLayout } from '~/layouts/FlowLayout';
|
||||
import { NodeLayout } from '~/layouts/NodeLayout';
|
||||
import { BorisLayout } from '~/layouts/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 { LabLayout } from '~/layouts/LabLayout';
|
||||
import { useShallowSelect } from '~/utils/hooks/useShallowSelect';
|
||||
import { selectAuthUser } from '~/redux/auth/selectors';
|
||||
|
||||
|
|
|
@ -1,17 +1,30 @@
|
|||
import React, { FC } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { Route, Switch } from 'react-router';
|
||||
import { TagSidebar } from '~/containers/sidebars/TagSidebar';
|
||||
import { ProfileSidebar } from '~/containers/sidebars/ProfileSidebar';
|
||||
import { Authorized } from '~/components/containers/Authorized';
|
||||
import { SubmitBar } from '~/components/bars/SubmitBar';
|
||||
|
||||
interface IProps {
|
||||
prefix?: string;
|
||||
isLab?: boolean;
|
||||
}
|
||||
|
||||
const SidebarRouter: FC<IProps> = ({ prefix = '' }) => (
|
||||
<Switch>
|
||||
<Route path={`${prefix}/tag/:tag`} component={TagSidebar} />
|
||||
<Route path={`${prefix}/~:username`} component={ProfileSidebar} />
|
||||
</Switch>
|
||||
);
|
||||
const SidebarRouter: FC<IProps> = ({ prefix = '', isLab }) => {
|
||||
return createPortal(
|
||||
<>
|
||||
<Switch>
|
||||
<Route path={`${prefix}/tag/:tag`} component={TagSidebar} />
|
||||
<Route path={`${prefix}/~:username`} component={ProfileSidebar} />
|
||||
</Switch>
|
||||
|
||||
<Authorized>
|
||||
<SubmitBar isLab={isLab} />
|
||||
</Authorized>
|
||||
</>,
|
||||
document.body
|
||||
);
|
||||
};
|
||||
|
||||
export { SidebarRouter };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue