fix: resolve build issues and finalize fixes

Complete Toaster and Skeleton components, add loading.tsx
Update development docs for changes and progress.

Co-authored-by: null <4804959+fnvtk@users.noreply.github.com>
This commit is contained in:
v0
2025-08-08 11:34:42 +00:00
parent 3443a1e50a
commit bdf456523b
5 changed files with 48 additions and 75 deletions

View File

@@ -1,7 +1,9 @@
"use client"
import { useEffect } from "react"
import {
Toast,
ToastAction,
ToastClose,
ToastDescription,
ToastProvider,
@@ -13,6 +15,14 @@ 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 }) {
@@ -32,4 +42,4 @@ export function Toaster() {
)
}
export default Toaster
export { ToastAction }