File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed
app/routes/directory-slug/[slugOnDir] Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1+ import { useParams } from 'one'
2+ import { Text } from 'react-native'
3+
4+ export async function generateStaticParams ( ) {
5+ return [
6+ {
7+ slugOnDir : 'foo' ,
8+ slugOnFile : 'bar' ,
9+ } ,
10+ ]
11+ }
12+
13+ export default function DirectorySlugTest ( ) {
14+ const params = useParams ( )
15+
16+ return < Text testID = "params-json" > { JSON . stringify ( params ) } </ Text >
17+ }
Original file line number Diff line number Diff line change 1+ import { useParams } from 'one'
2+ import { Text } from 'react-native'
3+
4+ export async function generateStaticParams ( ) {
5+ return [
6+ {
7+ slugOnDir : 'foo' ,
8+ slugOnFile : 'bar' ,
9+ } ,
10+ ]
11+ }
12+
13+ export default function DirectorySlugTest ( ) {
14+ const params = useParams ( )
15+
16+ return < Text testID = "params-json" > { JSON . stringify ( params ) } </ Text >
17+ }
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ declare module 'one' {
77 export namespace OneRouter {
88 export interface __routes < T extends string = string > extends Record < string , unknown > {
99 StaticRoutes : `/` | `/(auth-guard)` | `/(auth-guard)/auth-guard` | `/(blog)` | `/(blog)/blog/my-first-post` | `/(marketing)/about` | `/(sub-page-group)` | `/(sub-page-group)/sub-page` | `/(sub-page-group)/sub-page/sub` | `/(sub-page-group)/sub-page/sub2` | `/_sitemap` | `/about` | `/auth-guard` | `/blog/my-first-post` | `/expo-video` | `/hooks` | `/hooks/contents` | `/hooks/contents/page-1` | `/hooks/contents/page-2` | `/loader` | `/loader/other` | `/middleware` | `/not-found/deep/test` | `/not-found/fallback/test` | `/not-found/test` | `/server-data` | `/sheet` | `/spa/spapage` | `/ssr/basic` | `/sub-page` | `/sub-page/sub` | `/sub-page/sub2` | `/web-extensions`
10- DynamicRoutes : `/not-found/+not-found` | `/not-found/deep/+not-found` | `/routes/subpath/${string } ` | `/spa/${OneRouter . SingleRoutePart < T > } ` | `/ssr/${OneRouter . SingleRoutePart < T > } ` | `/ssr/${string } `
11- DynamicRouteTemplate : `/not-found/+not-found` | `/not-found/deep/+not-found` | `/routes/subpath/[...subpath]` | `/spa/[spaparams]` | `/ssr/[...rest]` | `/ssr/[param]`
10+ DynamicRoutes : `/not-found/+not-found` | `/not-found/deep/+not-found` | `/routes/directory-slug/${ OneRouter . SingleRoutePart < T > } /${ OneRouter . SingleRoutePart < T > } ` | `/routes/directory-slug/${ OneRouter . SingleRoutePart < T > } /subdir/${ OneRouter . SingleRoutePart < T > } ` | `/routes/ subpath/${string } ` | `/spa/${OneRouter . SingleRoutePart < T > } ` | `/ssr/${OneRouter . SingleRoutePart < T > } ` | `/ssr/${string } `
11+ DynamicRouteTemplate : `/not-found/+not-found` | `/not-found/deep/+not-found` | `/routes/directory-slug/[slugOnDir]/[slugOnFile]` | `/routes/directory-slug/[slugOnDir]/subdir/[slugOnFile]` | `/routes/ subpath/[...subpath]` | `/spa/[spaparams]` | `/ssr/[...rest]` | `/ssr/[param]`
1212 IsTyped : true
1313 }
1414 }
You can’t perform that action at this time.
0 commit comments