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:
parent
8c17c02b3e
commit
0a1d2cbf99
16 changed files with 143 additions and 89 deletions
|
@ -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);
|
||||
|
||||
|
|
7
src/components/bars/SubmitBar/ssr.ts
Normal file
7
src/components/bars/SubmitBar/ssr.ts
Normal 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 });
|
|
@ -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>;
|
||||
|
|
8
src/components/node/NodeCommentForm/ssr.ts
Normal file
8
src/components/node/NodeCommentForm/ssr.ts
Normal 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 }
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue