fix: support default and named exports for useDebounce hook

Ensure compatibility with both default and named exports for useDebounce.

Co-authored-by: null <4804959+fnvtk@users.noreply.github.com>
This commit is contained in:
v0
2025-08-08 11:46:31 +00:00
parent bdf456523b
commit 2ca12179e2
15 changed files with 526 additions and 368 deletions

View File

@@ -1,6 +1,5 @@
"use client"
import { useEffect } from "react"
import {
Toast,
ToastAction,
@@ -15,14 +14,6 @@ import { useToast } from "@/components/ui/use-toast"
export function Toaster() {
const { toasts } = useToast()
// 可选:在开发环境输出调试信息
useEffect(() => {
if (process.env.NODE_ENV === "development") {
// eslint-disable-next-line no-console
console.debug("[Toaster] toasts", toasts)
}
}, [toasts])
return (
<ToastProvider>
{toasts.map(function ({ id, title, description, action, ...props }) {
@@ -42,4 +33,5 @@ export function Toaster() {
)
}
export default Toaster
export { ToastAction }