- app/layout.tsx 新增 import { Toaster } from '@/components/ui/sonner'
- <body> 内 {children} 之后渲染 <Toaster />
- 修复仓库 9 处 toast 调用静默失败的 pre-existing dead code 问题
- Phase 3 业务功能 (toast 反馈) 的硬前置
25 lines
438 B
TypeScript
25 lines
438 B
TypeScript
import type { Metadata } from 'next'
|
|
import './globals.css'
|
|
import { Toaster } from '@/components/ui/sonner'
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'v0 App',
|
|
description: 'Created with v0',
|
|
generator: 'v0.dev',
|
|
}
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode
|
|
}>) {
|
|
return (
|
|
<html lang="en">
|
|
<body>
|
|
{children}
|
|
<Toaster />
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|