diff options
| author | 2026-02-08 19:01:03 +0800 | |
|---|---|---|
| committer | 2026-02-08 19:01:03 +0800 | |
| commit | a83363bccada6013d3f03efedeff22b45a578da7 (patch) | |
| tree | 77dda7a4fd98cb64da463b527df5f51f97395c27 /packages/docs/app/routes.ts | |
| parent | 0e61d6bf86af5aca9dac85ae61d4f077984e26a8 (diff) | |
| parent | f656803e7419dc0ccbfdf86752e3284472fed164 (diff) | |
| download | DropOut-a83363bccada6013d3f03efedeff22b45a578da7.tar.gz DropOut-a83363bccada6013d3f03efedeff22b45a578da7.zip | |
Merge branch 'main' into refactor/migrate-to-react
Diffstat (limited to 'packages/docs/app/routes.ts')
| -rw-r--r-- | packages/docs/app/routes.ts | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/packages/docs/app/routes.ts b/packages/docs/app/routes.ts index 60dd630..2997ecf 100644 --- a/packages/docs/app/routes.ts +++ b/packages/docs/app/routes.ts @@ -1,7 +1,16 @@ -import { index, route, type RouteConfig } from '@react-router/dev/routes'; +import { route, type RouteConfig } from '@react-router/dev/routes'; export default [ - index('routes/home.tsx'), - route('docs/*', 'docs/page.tsx'), - route('api/search', 'docs/search.ts'), + // Home routes: / and /:lang + route(':lang?', 'routes/home.tsx', { id: 'home' }), + + // Docs routes: /docs/* and /:lang/docs/* + route(':lang?/docs', 'routes/docs.tsx', { id: 'docs' }), + route(':lang?/docs/*', 'docs/page.tsx', { id: 'docs-page' }), + + // API routes + route('api/search', 'docs/search.ts', { id: 'api-search' }), + + // Catch-all 404 + route('*', 'routes/not-found.tsx', { id: 'not-found' }), ] satisfies RouteConfig; |