Fix: Resolve Toast Type Error

The toast function was updated to correctly pass the 'id' property, resolving the TypeScript error.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-16 09:17:47 +00:00
parent 7b50054da4
commit f228410b83
9 changed files with 17 additions and 15 deletions

View File

@@ -2,7 +2,7 @@
import * as React from "react"
import { ToastProps } from "@/components/ui/toast"
import { useToast as useToastStore } from "@/components/ui/use-toast"
import { useToastStore } from "@/components/ui/use-toast"
import { ToastActionElement } from "@/components/ui/toast"
// 기본 지속 시간 늘리기 (기존 3000ms → 3500ms)
@@ -16,6 +16,7 @@ export type ToasterToast = ToastProps & {
description?: React.ReactNode;
action?: React.ReactNode;
duration?: number; // 지속 시간 추가
variant?: "default" | "destructive"; // variant 속성 추가
};
const actionTypes = ['default', 'cancel'] as const
@@ -69,7 +70,7 @@ export const useToast = () => {
addToast,
updateToast,
dismissToast,
toast: (props: ToasterToast) => addToast(props), // toast 속성 추가
toast: (props: Omit<ToasterToast, "id">) => addToast(props),
};
};