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

added dynamic routes

This commit is contained in:
Fedor Katurov 2022-07-17 12:36:09 +07:00
parent 8c17c02b3e
commit 0a1d2cbf99
16 changed files with 143 additions and 89 deletions

View file

@ -8,12 +8,11 @@ import { useShowModal } from '~/hooks/modal/useShowModal';
import styles from './styles.module.scss';
interface Props {
export interface SubmitBarProps {
isLab?: boolean;
}
const SubmitBar: FC<Props> = ({ isLab }) => {
const SubmitBar: FC<SubmitBarProps> = ({ isLab }) => {
const showModal = useShowModal(Dialog.CreateNode);
const [focused, setFocused] = useState(false);

View file

@ -0,0 +1,7 @@
import dynamic from 'next/dynamic';
import type { SubmitBarProps } from './index';
export const SubmitBarSSR = dynamic<SubmitBarProps>(
() => import('./index').then(it => it.SubmitBar),
{ ssr: false });

View file

@ -5,7 +5,7 @@ import { CommentWrapper } from '~/components/containers/CommentWrapper';
import { IComment } from '~/types';
import { IUser } from '~/types/auth';
interface NodeCommentFormProps {
export interface NodeCommentFormProps {
user: IUser;
nodeId?: number;
saveComment: (comment: IComment) => Promise<unknown>;

View file

@ -0,0 +1,8 @@
import dynamic from 'next/dynamic';
import type { NodeCommentFormProps } from './index';
export const NodeCommentFormSSR = dynamic<NodeCommentFormProps>(
() => import('./index').then(it => it.NodeCommentForm),
{ ssr: false }
);