From d7f98fc0aa8b205e2136c2cf8378732162de444b Mon Sep 17 00:00:00 2001 From: Sead Feng Date: Tue, 27 Aug 2024 17:34:42 +0800 Subject: [PATCH] remove dynamic --- src/components/frontend/shared/image-code.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/frontend/shared/image-code.tsx b/src/components/frontend/shared/image-code.tsx index 8eedbc7..95ff4f3 100644 --- a/src/components/frontend/shared/image-code.tsx +++ b/src/components/frontend/shared/image-code.tsx @@ -1,11 +1,10 @@ "use client"; +import CodeCopyBtn from "@/components/shared/CodeCopyBtn"; import { Skeleton } from "@/components/ui/skeleton"; import { isBrowser } from "@/lib/utils"; -import dynamic from 'next/dynamic'; import Image from "next/image"; import { useEffect, useState } from "react"; - -const CodeCopyBtn = dynamic(() => import('../../shared/CodeCopyBtn'), { ssr: false }); + const ImageCode = ({ alt, title, src, codeStr, className}: { src: string; codeStr: string; title: string; alt: string; className?: string; }) => { const [dimensions, setDimensions] = useState<{ width: number; height: number } | null>(null);