Skip to content

Commit

Permalink
chore: rename PagePath back to Path to reduce diff
Browse files Browse the repository at this point in the history
  • Loading branch information
tylersayshi committed Sep 7, 2024
1 parent 5b71f3c commit d1e5a2a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/waku/src/router/create-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,31 +147,31 @@ export type PathWithWildcard<
> = PathWithSlug<Path, SlugKey | `...${WildSlugKey}`>;

export type CreatePage = <
PagePath extends string,
Path extends string,
SlugKey extends string,
WildSlugKey extends string,
Render extends 'static' | 'dynamic',
>(
page: (
| {
render: Extract<Render, 'static'>;
path: PathWithoutSlug<PagePath>;
path: PathWithoutSlug<Path>;
component: FunctionComponent<RouteProps>;
}
| {
render: Extract<Render, 'static'>;
path: PathWithStaticSlugs<PagePath>;
staticPaths: StaticSlugRoutePaths<PagePath>;
path: PathWithStaticSlugs<Path>;
staticPaths: StaticSlugRoutePaths<Path>;
component: FunctionComponent<RouteProps & Record<SlugKey, string>>;
}
| {
render: Extract<Render, 'dynamic'>;
path: PathWithoutSlug<PagePath>;
path: PathWithoutSlug<Path>;
component: FunctionComponent<RouteProps>;
}
| {
render: Extract<Render, 'dynamic'>;
path: PathWithWildcard<PagePath, SlugKey, WildSlugKey>;
path: PathWithWildcard<Path, SlugKey, WildSlugKey>;
component: FunctionComponent<
RouteProps & Record<SlugKey, string> & Record<WildSlugKey, string[]>
>;
Expand Down

0 comments on commit d1e5a2a

Please sign in to comment.