Skip to content

Commit

Permalink
Use LayoutWithBackButton in playlist route
Browse files Browse the repository at this point in the history
This will add a back button in secondary navbar at the top of the page.
  • Loading branch information
MonkeyDo committed Jan 16, 2025
1 parent 704d408 commit 46a036e
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions frontend/js/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down

0 comments on commit 46a036e

Please sign in to comment.