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

removed all router-modals

This commit is contained in:
Fedor Katurov 2022-01-09 20:27:23 +07:00
parent 85d20e5009
commit ffce400398
15 changed files with 99 additions and 143 deletions

View file

@ -4,7 +4,6 @@ import { Route, Switch } from 'react-router';
import { TagSidebar } from '~/containers/sidebars/TagSidebar';
import { Authorized } from '~/components/containers/Authorized';
import { SubmitBar } from '~/components/bars/SubmitBar';
import { EditorCreateDialog } from '~/containers/dialogs/EditorCreateDialog';
interface IProps {
prefix?: string;
@ -13,16 +12,9 @@ interface IProps {
const SidebarRouter: FC<IProps> = ({ prefix = '', isLab }) => {
return createPortal(
<>
<Switch>
<Route path={`${prefix}/create/:type`} component={EditorCreateDialog} />
<Route path={`${prefix}/tag/:tag`} component={TagSidebar} />
</Switch>
<Authorized>
<SubmitBar isLab={isLab} />
</Authorized>
</>,
<Authorized>
<SubmitBar isLab={isLab} />
</Authorized>,
document.body
);
};