"use client"; import { FileIcon, X } from "lucide-react"; import Image from "next/image"; import { UploadDropzone } from "@/lib/uploadthing"; import "@uploadthing/react/styles.css"; interface FileUploadProps { onChange: (url?: string) => void; value: string; endpoint: "messageFile" | "serverImage"; } export const FileUpload = ({ onChange, value, endpoint, }: FileUploadProps) => { const fileType = value?.split(".").pop(); if (value && fileType !== "pdf") { return (