feat(03-01): 在 RootLayout 挂载 Sonner Toaster

- app/layout.tsx 新增 import { Toaster } from '@/components/ui/sonner'
- <body> 内 {children} 之后渲染 <Toaster />
- 修复仓库 9 处 toast 调用静默失败的 pre-existing dead code 问题
- Phase 3 业务功能 (toast 反馈) 的硬前置
This commit is contained in:
pmc 2026-05-08 12:25:59 +08:00
parent 069c01d3ae
commit 7065d73666

View File

@ -1,5 +1,6 @@
import type { Metadata } from 'next' import type { Metadata } from 'next'
import './globals.css' import './globals.css'
import { Toaster } from '@/components/ui/sonner'
export const metadata: Metadata = { export const metadata: Metadata = {
title: 'v0 App', title: 'v0 App',
@ -14,7 +15,10 @@ export default function RootLayout({
}>) { }>) {
return ( return (
<html lang="en"> <html lang="en">
<body>{children}</body> <body>
{children}
<Toaster />
</body>
</html> </html>
) )
} }