temp
This commit is contained in:
17
src/pages/a/ClientApp.tsx
Normal file
17
src/pages/a/ClientApp.tsx
Normal 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} />;
|
||||
}
|
||||
Reference in New Issue
Block a user