convert datepicker to next/dynamic
This commit is contained in:
parent
eda977b203
commit
c813ffaf56
1 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,6 @@ import generateUUID from "@lib/generate-uuid"
|
||||||
import styles from "./post.module.css"
|
import styles from "./post.module.css"
|
||||||
import EditDocumentList from "./edit-document-list"
|
import EditDocumentList from "./edit-document-list"
|
||||||
import { ChangeEvent } from "react"
|
import { ChangeEvent } from "react"
|
||||||
import DatePicker from "react-datepicker"
|
|
||||||
import getTitleForPostCopy from "@lib/get-title-for-post-copy"
|
import getTitleForPostCopy from "@lib/get-title-for-post-copy"
|
||||||
import Description from "./description"
|
import Description from "./description"
|
||||||
import { PostWithFiles } from "@lib/server/prisma"
|
import { PostWithFiles } from "@lib/server/prisma"
|
||||||
|
@ -20,6 +19,9 @@ import { useToasts } from "@components/toasts"
|
||||||
import { useSessionSWR } from "@lib/use-session-swr"
|
import { useSessionSWR } from "@lib/use-session-swr"
|
||||||
import { fetchWithUser } from "src/app/lib/fetch-with-user"
|
import { fetchWithUser } from "src/app/lib/fetch-with-user"
|
||||||
|
|
||||||
|
import dynamic from "next/dynamic"
|
||||||
|
const DatePicker = dynamic(() => import("react-datepicker"))
|
||||||
|
|
||||||
const emptyDoc = {
|
const emptyDoc = {
|
||||||
title: "",
|
title: "",
|
||||||
content: "",
|
content: "",
|
||||||
|
|
Loading…
Reference in a new issue