import { useCallback, memo } from 'react' import { Modal, ModalClose, Button } from '@janhq/joi' import { Trash2Icon } from 'lucide-react' import useDeleteThread from '@/hooks/useDeleteThread' type Props = { threadId: string } const ModalDeleteThread = ({ threadId }: Props) => { const { deleteThread } = useDeleteThread() const onDeleteThreadClick = useCallback( (e: React.MouseEvent) => { e.stopPropagation() deleteThread(threadId) }, [deleteThread, threadId] ) return ( e.stopPropagation()} > Delete thread } content={

Are you sure you want to delete this thread? This action cannot be undone.

e.stopPropagation()}>
} /> ) } export default memo(ModalDeleteThread)