Skip to content

Commit

Permalink
Create trainer page
Browse files Browse the repository at this point in the history
  • Loading branch information
simonkellly committed May 24, 2024
1 parent 80bcf24 commit 19159d0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@
// Import Routes

import { Route as rootRoute } from './routes/__root'
import { Route as TrainerImport } from './routes/trainer'
import { Route as TimerImport } from './routes/timer'
import { Route as IndexImport } from './routes/index'

// Create/Update Routes

const TrainerRoute = TrainerImport.update({
path: '/trainer',
getParentRoute: () => rootRoute,
} as any)

const TimerRoute = TimerImport.update({
path: '/timer',
getParentRoute: () => rootRoute,
Expand All @@ -38,11 +44,19 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof TimerImport
parentRoute: typeof rootRoute
}
'/trainer': {
preLoaderRoute: typeof TrainerImport
parentRoute: typeof rootRoute
}
}
}

// Create and export the route tree

export const routeTree = rootRoute.addChildren([IndexRoute, TimerRoute])
export const routeTree = rootRoute.addChildren([
IndexRoute,
TimerRoute,
TrainerRoute,
])

/* prettier-ignore-end */
14 changes: 14 additions & 0 deletions src/routes/trainer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { ActionBar } from "@/timer/actionBar";
import { createFileRoute } from "@tanstack/react-router";

export const Route = createFileRoute('/trainer')({
component: Trainer,
});

function Trainer() {
return (
<div className="flex flex-col justify-between h-screen w-screen p-2">
<ActionBar />
</div>
);
}

0 comments on commit 19159d0

Please sign in to comment.