From d54b4fc963e26d1bcff0195c7b46d9da61844224 Mon Sep 17 00:00:00 2001 From: gunshiz Date: Thu, 8 Oct 2026 18:30:24 +0700 Subject: [PATCH] fix : use native emoji picker instead of cdn emoji --- components/comments/comment-composer.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/comments/comment-composer.tsx b/components/comments/comment-composer.tsx index 2a9eeb6..7c9d28b 100644 --- a/components/comments/comment-composer.tsx +++ b/components/comments/comment-composer.tsx @@ -1,6 +1,6 @@ "use client"; -import { useEffect, useId, useRef, useState, type ClipboardEvent, type FormEvent } from "react"; +import { useEffect, useId, useRef, useState, type ClipboardEvent, type ComponentProps, type FormEvent } from "react"; import dynamic from "next/dynamic"; import { ImagePlusIcon, SmilePlusIcon, XIcon } from "lucide-react"; import { toast } from "sonner"; @@ -15,7 +15,12 @@ import type { CommentImage, CommentItem } from "@/lib/comments/types"; import { CommentImageView } from "./comment-image"; import { COMMENT_ERRORS } from "./client"; -const EmojiPicker = dynamic(() => import("emoji-picker-react"), { ssr: false }); +const EmojiPicker = dynamic(async () => { + const { default: Picker, EmojiStyle } = await import("emoji-picker-react"); + return function NativeEmojiPicker(props: ComponentProps) { + return ; + }; +}, { ssr: false }); function FilePreview({ file }: { file: File }) { const imageRef = useRef(null);