Skip to content

Commit

Permalink
Merge pull request #444 from ictsc/fix-tanstack-router
Browse files Browse the repository at this point in the history
Link の型エラーを修正
  • Loading branch information
tosuke authored Sep 10, 2024
2 parents 8e4f45e + ab16192 commit 3a0a618
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 46 deletions.
1 change: 0 additions & 1 deletion frontend/packages/contestant/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const config = {
"@storybook/addon-onboarding",
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function HeaderView({ contestState }: HeaderViewProps) {
return (
<div className="flex size-full items-center border-b-[3px] border-primary bg-surface-0">
<div className="flex-none">
<Link>
<Link to="/">
<Logo height={60} />
</Link>
</div>
Expand Down
34 changes: 33 additions & 1 deletion frontend/packages/contestant/app/routes.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,39 @@ declare module "@tanstack/react-router" {

// Create and export the route tree

export const routeTree = rootRoute.addChildren({ IndexRouteRoute });
export interface FileRoutesByFullPath {
"/": typeof IndexRouteRoute;
}

export interface FileRoutesByTo {
"/": typeof IndexRouteRoute;
}

export interface FileRoutesById {
__root__: typeof rootRoute;
"/": typeof IndexRouteRoute;
}

export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath;
fullPaths: "/";
fileRoutesByTo: FileRoutesByTo;
to: "/";
id: "__root__" | "/";
fileRoutesById: FileRoutesById;
}

export interface RootRouteChildren {
IndexRouteRoute: typeof IndexRouteRoute;
}

const rootRouteChildren: RootRouteChildren = {
IndexRouteRoute: IndexRouteRoute,
};

export const routeTree = rootRoute
._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>();

/* prettier-ignore-end */

Expand Down
1 change: 0 additions & 1 deletion frontend/packages/contestant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
},
"prettier": "@ictsc/config/prettier",
"devDependencies": {
"@chromatic-com/storybook": "^2.0.0",
"@ictsc/config": "workspace:*",
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-interactions": "^8.2.9",
Expand Down
42 changes: 0 additions & 42 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a0a618

Please sign in to comment.