From 6c2fd3837b0cc782bf3c6c9548784b89748d60cf Mon Sep 17 00:00:00 2001 From: X4Lo Date: Wed, 17 Jun 2026 04:03:37 +0100 Subject: [PATCH] removed old routes --- react_frontend/src/pages/TmdbPreviewPage.tsx | 7 +++++++ react_frontend/src/router.tsx | 22 -------------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/react_frontend/src/pages/TmdbPreviewPage.tsx b/react_frontend/src/pages/TmdbPreviewPage.tsx index e07efcc..72e0f1c 100644 --- a/react_frontend/src/pages/TmdbPreviewPage.tsx +++ b/react_frontend/src/pages/TmdbPreviewPage.tsx @@ -31,6 +31,13 @@ export function TmdbPreviewPage() { return null; }); + // Redirect immediately if entry is already in library — skip the preview step + useEffect(() => { + if (libraryEntry) { + navigate(`/entry/${libraryEntry.id}`, { replace: true }); + } + }, [libraryEntry, navigate]); + // Track recently viewed for command palette const addRecentlyViewed = useCommandPaletteStore((s) => s.addRecentlyViewed); useEffect(() => { diff --git a/react_frontend/src/router.tsx b/react_frontend/src/router.tsx index 97e3834..26143e2 100644 --- a/react_frontend/src/router.tsx +++ b/react_frontend/src/router.tsx @@ -22,12 +22,6 @@ import { const HomePage = lazy(() => import('@/pages/HomePage').then((m) => ({ default: m.HomePage })) ); -const HomePage2 = lazy(() => - import('@/pages/HomePage2').then((m) => ({ default: m.HomePage2 })) -); -const HomePage3 = lazy(() => - import('@/pages/HomePage3').then((m) => ({ default: m.HomePage3 })) -); const DashboardPage = lazy(() => import('@/pages/DashboardPage').then((m) => ({ default: m.DashboardPage })) ); @@ -111,22 +105,6 @@ export const router = createRouter([ ), }, - { - path: '/home2', - element: ( - }> - - - ), - }, - { - path: '/home3', - element: ( - }> - - - ), - }, { path: '/search', element: (