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:
Leonid Pershin
2026-07-24 19:08:17 +03:00
parent b7cdc4ad96
commit 8281832e1d
5 changed files with 56 additions and 10 deletions
@@ -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 })
+3 -3
View File
@@ -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 })
+3 -3
View File
@@ -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 /> })