Update routing for admin channels and shows: add index routes for channels and shows, refactor components to use Outlet for nested routing, and enhance type definitions for new routes in the routing structure.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
import { createFileRoute } from '@tanstack/react-router'
|
||||
import { ChannelsPanel } from '@/features/admin/channels/ChannelsPanel'
|
||||
|
||||
export const Route = createFileRoute('/admin/channels/')({ component: ChannelsPanel })
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createFileRoute } from '@tanstack/react-router'
|
||||
import { ChannelsPanel } from '@/features/admin/channels/ChannelsPanel'
|
||||
import { createFileRoute, Outlet } from '@tanstack/react-router'
|
||||
|
||||
export const Route = createFileRoute('/admin/channels')({ component: ChannelsPanel })
|
||||
// Лейаут для /admin/channels/*: список — в index-роуте, деталь — в channels.$channelId.
|
||||
export const Route = createFileRoute('/admin/channels')({ component: () => <Outlet /> })
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createFileRoute } from '@tanstack/react-router'
|
||||
import { ShowsPanel } from '@/features/admin/shows/ShowsPanel'
|
||||
|
||||
export const Route = createFileRoute('/admin/shows/')({ component: ShowsPanel })
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createFileRoute } from '@tanstack/react-router'
|
||||
import { ShowsPanel } from '@/features/admin/shows/ShowsPanel'
|
||||
import { createFileRoute, Outlet } from '@tanstack/react-router'
|
||||
|
||||
export const Route = createFileRoute('/admin/shows')({ component: ShowsPanel })
|
||||
// Лейаут для /admin/shows/*: список — в index-роуте, деталь — в shows.$showId.
|
||||
export const Route = createFileRoute('/admin/shows')({ component: () => <Outlet /> })
|
||||
|
||||
Reference in New Issue
Block a user