'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} />;
}

// 'use client';
// // import List from './List.tsx';

// export default function ClientApp() {
//   const inner = typeof window !== 'undefined' && window.__SERVER_DATA__?.innerHtml
//   const cm = inner ? <div dangerouslySetInnerHTML={{ __html: inner }}></div> : null;
//   return <div>
//     {cm}
//   </div>
// }