From ff31b0c03ef368fc2986406b6dd9747410694b2c Mon Sep 17 00:00:00 2001 From: Simon <10131203+gaomeng1900@users.noreply.github.com> Date: Thu, 5 Mar 2026 16:21:58 +0800 Subject: [PATCH] chore: adjust website structure --- packages/website/AGENTS.md | 2 +- packages/website/src/pages/{Home.tsx => home/index.tsx} | 8 ++++---- packages/website/src/router.tsx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename packages/website/src/pages/{Home.tsx => home/index.tsx} (64%) diff --git a/packages/website/AGENTS.md b/packages/website/AGENTS.md index 1a2290d..22dc4b6 100644 --- a/packages/website/AGENTS.md +++ b/packages/website/AGENTS.md @@ -62,7 +62,7 @@ Located in `src/components/ui/`: src/ ├── pages/ │ ├── home/ -│ │ ├── HomeContent.tsx # Homepage sections +│ │ ├── index.tsx # Homepage │ │ └── ...Section.tsx │ └── docs/ │ ├── index.tsx # Docs route switch diff --git a/packages/website/src/pages/Home.tsx b/packages/website/src/pages/home/index.tsx similarity index 64% rename from packages/website/src/pages/Home.tsx rename to packages/website/src/pages/home/index.tsx index 15b6a10..c6589a7 100644 --- a/packages/website/src/pages/Home.tsx +++ b/packages/website/src/pages/home/index.tsx @@ -1,10 +1,10 @@ import { Suspense, lazy } from 'react' -import HeroSection from './home/HeroSection' +import HeroSection from './HeroSection' -const FeaturesSection = lazy(() => import('./home/FeaturesSection')) -const ScenariosSection = lazy(() => import('./home/ScenariosSection')) -const OneMoreThingSection = lazy(() => import('./home/OneMoreThingSection')) +const FeaturesSection = lazy(() => import('./FeaturesSection')) +const ScenariosSection = lazy(() => import('./ScenariosSection')) +const OneMoreThingSection = lazy(() => import('./OneMoreThingSection')) export default function HomePage() { return ( diff --git a/packages/website/src/router.tsx b/packages/website/src/router.tsx index 1e427c2..6df2bda 100644 --- a/packages/website/src/router.tsx +++ b/packages/website/src/router.tsx @@ -3,9 +3,9 @@ import { Route, Switch, useLocation } from 'wouter' import Footer from './components/Footer' import Header from './components/Header' -import HomePage from './pages/Home' +import HomePage from './pages/home' -const docsImport = () => import('./pages/docs/index') +const docsImport = () => import('./pages/docs') const DocsPages = lazy(docsImport) function ScrollToTop() {