"use client"; /** * 根级 Client Providers 包装 * * 本轮只做两件事: * 1. 透传 `children`,让 `app/layout.tsx` 保持 Server Component 的同时, * 在子树中按需渲染 Client-only 组件(如未来 ``)。 * 2. 预置一个 `
` 挂载点,供后续 toast 系统 * 通过 `createPortal(..., document.getElementById("toast-portal"))` 渲染。 * * 不引入任何运行时依赖;不挂载任何 Context。 */ import type { ReactNode } from "react"; export interface RootProvidersProps { children: ReactNode; } export function RootProviders({ children }: RootProvidersProps) { return ( <> {children}
); }