This commit is contained in:
2026-04-14 12:38:51 +08:00
parent bb7e654589
commit 53a4174aa9
4 changed files with 35 additions and 22 deletions

17
src/pages/a/ClientApp.tsx Normal file
View File

@@ -0,0 +1,17 @@
'use client';
import List from './List.tsx';
// Client Component - 用于 hydration结构需要和 ServerApp 一致
declare global {
interface Window {
__SERVER_DATA__?: { version: string };
}
}
export default function ClientApp() {
const version = typeof window !== 'undefined' && window.__SERVER_DATA__?.version
? window.__SERVER_DATA__.version
: 'loading';
return <List version={version} />;
}