27 lines
613 B
TypeScript
27 lines
613 B
TypeScript
/**
|
||
* 首页入口组件
|
||
* 使用专用骨架屏作为 Suspense fallback,优化加载体验
|
||
*
|
||
* @module views/Home
|
||
*/
|
||
|
||
import React, { Suspense, lazy } from 'react';
|
||
import { HomePageSkeleton } from './components/HomePageSkeleton';
|
||
|
||
// 懒加载实际首页组件
|
||
const HomePage = lazy(() => import('./HomePage'));
|
||
|
||
/**
|
||
* 首页入口 - 带骨架屏的懒加载包装
|
||
* 使用深色风格骨架屏,与首页视觉风格一致
|
||
*/
|
||
const HomePageEntry: React.FC = () => {
|
||
return (
|
||
<Suspense fallback={<HomePageSkeleton />}>
|
||
<HomePage />
|
||
</Suspense>
|
||
);
|
||
};
|
||
|
||
export default HomePageEntry;
|