From 110881098cca2eee95bf66e33108b5684d804c70 Mon Sep 17 00:00:00 2001 From: Devyash Saini Date: Mon, 12 Aug 2024 22:49:45 +0530 Subject: [PATCH] build error resolved --- src/app/blogwriter/page.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/blogwriter/page.tsx b/src/app/blogwriter/page.tsx index ec7e477..f910dd7 100644 --- a/src/app/blogwriter/page.tsx +++ b/src/app/blogwriter/page.tsx @@ -1,7 +1,10 @@ "use client"; -import React, { useState, useRef, useMemo } from "react"; -import JoditEditor from "jodit-react"; +import React, { useState, useRef } from "react"; +import dynamic from "next/dynamic"; + +// Dynamically import JoditEditor to ensure it only runs in the browser +const JoditEditor = dynamic(() => import("jodit-react"), { ssr: false }); const Example = () => { const editor = useRef(null); @@ -21,4 +24,4 @@ const Example = () => { ); }; -export default Example; +export default Example; \ No newline at end of file