mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-05 01:27:46 +07:00
24 lines
520 B
TypeScript
24 lines
520 B
TypeScript
import React, { FC } from 'react';
|
|
import { createPortal } from 'react-dom';
|
|
import { Authorized } from '~/components/containers/Authorized';
|
|
import { SubmitBar } from '~/components/bars/SubmitBar';
|
|
|
|
interface IProps {
|
|
prefix?: string;
|
|
isLab?: boolean;
|
|
}
|
|
|
|
const SidebarRouter: FC<IProps> = ({ isLab }) => {
|
|
if (typeof document === 'undefined') {
|
|
return null;
|
|
}
|
|
|
|
return createPortal(
|
|
<Authorized>
|
|
<SubmitBar isLab={isLab} />
|
|
</Authorized>,
|
|
document.body
|
|
);
|
|
};
|
|
|
|
export { SidebarRouter };
|