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:
parent
069c01d3ae
commit
7065d73666
@ -1,5 +1,6 @@
|
||||
import type { Metadata } from 'next'
|
||||
import './globals.css'
|
||||
import { Toaster } from '@/components/ui/sonner'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'v0 App',
|
||||
@ -14,7 +15,10 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>{children}</body>
|
||||
<body>
|
||||
{children}
|
||||
<Toaster />
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user