From c813ffaf561513b0030209c4d68bd358feb40d70 Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Sun, 29 Jan 2023 00:14:04 -0800 Subject: [PATCH] convert datepicker to next/dynamic --- src/app/(posts)/new/components/new.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/(posts)/new/components/new.tsx b/src/app/(posts)/new/components/new.tsx index 73ee1e4b..5015cc8c 100644 --- a/src/app/(posts)/new/components/new.tsx +++ b/src/app/(posts)/new/components/new.tsx @@ -6,7 +6,6 @@ import generateUUID from "@lib/generate-uuid" import styles from "./post.module.css" import EditDocumentList from "./edit-document-list" import { ChangeEvent } from "react" -import DatePicker from "react-datepicker" import getTitleForPostCopy from "@lib/get-title-for-post-copy" import Description from "./description" import { PostWithFiles } from "@lib/server/prisma" @@ -20,6 +19,9 @@ import { useToasts } from "@components/toasts" import { useSessionSWR } from "@lib/use-session-swr" import { fetchWithUser } from "src/app/lib/fetch-with-user" +import dynamic from "next/dynamic" +const DatePicker = dynamic(() => import("react-datepicker")) + const emptyDoc = { title: "", content: "",