Skip to content

Commit

Permalink
fix: quilleditor ssr加载失败
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Feb 25, 2024
1 parent a3a499a commit 8a25248
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/QuillWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
"use client";

import dynamic from "next/dynamic";
import ReduxProvider from "@/app/store/ReduxProvider";
import QEditor from "@/components/QuillEditor";
// import QEditor from "@/components/QuillEditor";

// 动态导入 QuillEditor 组件,禁用 SSR
const QEditor = dynamic(() => import("@/components/QuillEditor"), {
ssr: false,
});
export default function QuillWrapper({ lng }) {
return (
<ReduxProvider>
Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"next-redux-wrapper": "^8.1.0",
"openai": "^4.24.3",
"postcss": "8.4.35",
"punycode": "^2.3.1",
"quill": "^1.3.7",
"quill-to-word": "^1.3.0",
"raw-body": "^2.5.2",
Expand Down

0 comments on commit 8a25248

Please sign in to comment.