diff --git a/app/src/components/home/ChatWrapper.tsx b/app/src/components/home/ChatWrapper.tsx index 35b383f6..79bf1c41 100644 --- a/app/src/components/home/ChatWrapper.tsx +++ b/app/src/components/home/ChatWrapper.tsx @@ -29,7 +29,6 @@ import { Dialog, DialogContent, DialogDescription, - DialogFooter, DialogHeader, DialogTitle, DialogTrigger diff --git a/app/src/components/ui/use-toast.ts b/app/src/components/ui/use-toast.ts index 88cfb75f..fe4ba7c2 100644 --- a/app/src/components/ui/use-toast.ts +++ b/app/src/components/ui/use-toast.ts @@ -137,7 +137,7 @@ function dispatch(action: Action) { type Toast = Omit; -function toast({ ...props }: Toast) { +function toast({ ...props }: Toast, timeout?: number) { const id = genId(); const update = (props: ToasterToast) => @@ -147,6 +147,8 @@ function toast({ ...props }: Toast) { }); const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id }); + setTimeout(dismiss, timeout ?? 5000); + dispatch({ type: "ADD_TOAST", toast: {