From 7ee3bea2a095be27335bf049da88772cca881410 Mon Sep 17 00:00:00 2001 From: Dustin Loring Date: Sat, 7 Dec 2024 16:34:08 -0500 Subject: [PATCH] typecheck fix --- app/components/chat/SendButton.client.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/components/chat/SendButton.client.tsx b/app/components/chat/SendButton.client.tsx index 59e5e52a..c5aa8304 100644 --- a/app/components/chat/SendButton.client.tsx +++ b/app/components/chat/SendButton.client.tsx @@ -3,25 +3,29 @@ import { AnimatePresence, cubicBezier, motion } from 'framer-motion'; interface SendButtonProps { show: boolean; isStreaming?: boolean; + disabled?: boolean; onClick?: (event: React.MouseEvent) => void; onImagesSelected?: (images: File[]) => void; } const customEasingFn = cubicBezier(0.4, 0, 0.2, 1); -export const SendButton = ({ show, isStreaming, onClick }: SendButtonProps) => { +export const SendButton = ({ show, isStreaming, disabled, onClick }: SendButtonProps) => { return ( {show ? ( { event.preventDefault(); - onClick?.(event); + if (!disabled) { + onClick?.(event); + } }} >