From 46a036eeeb58477159ee7ca5464cff7af8fb1a6d Mon Sep 17 00:00:00 2001 From: Monkey Do Date: Thu, 16 Jan 2025 16:28:47 +0100 Subject: [PATCH] Use LayoutWithBackButton in playlist route This will add a back button in secondary navbar at the top of the page. --- frontend/js/src/routes/index.tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/frontend/js/src/routes/index.tsx b/frontend/js/src/routes/index.tsx index 7008619ba7..9278dad738 100644 --- a/frontend/js/src/routes/index.tsx +++ b/frontend/js/src/routes/index.tsx @@ -78,12 +78,23 @@ const getIndexRoutes = (): RouteObject[] => { }, }, { - path: "playlist/:playlistID/", + path: "playlist/", lazy: async () => { - const PlaylistPage = await import("../playlists/Playlist"); - return { Component: PlaylistPage.default }; + const LayoutWithBackButton = await import( + "../layout/LayoutWithBackButton" + ); + return { Component: LayoutWithBackButton.default }; }, - loader: RouteLoader, + children: [ + { + path: ":playlistID/", + lazy: async () => { + const PlaylistPage = await import("../playlists/Playlist"); + return { Component: PlaylistPage.default }; + }, + loader: RouteLoader, + }, + ], }, { path: "/statistics/",