added template for player view with props

This commit is contained in:
Sascha Kühl 2025-05-27 16:27:16 +02:00
parent 8d829975a6
commit 39d0f807d4
1 changed files with 11 additions and 1 deletions

View File

@ -22,7 +22,17 @@ const routes: Array<RouteRecordRaw> = [
{ path: '/player', component: PlayerView }, { path: '/player', component: PlayerView },
{ path: '/bullpen', component: BullpenView }, { path: '/bullpen', component: BullpenView },
{ path: '/stats', component: BullpenListView }, { path: '/stats', component: BullpenListView },
{ path: '/summary', component: BullpenSummaryView } { path: '/summary', component: BullpenSummaryView },
// {
// path: '/player/:id',
// name: 'EditPlayer',
// component: () => import('@/views/PlayerView.vue'),
// props: (route) => ({
// player: route.state?.player || null, // Pass the player from the state if available
// mode: route.query.mode || 'create', // Default to "create" if no query exists
// }),
// },
] ]
const router = createRouter({ const router = createRouter({