diff --git a/packages/frontend/src/App.tsx b/packages/frontend/src/App.tsx index 8646dd0..46376bb 100644 --- a/packages/frontend/src/App.tsx +++ b/packages/frontend/src/App.tsx @@ -129,9 +129,9 @@ export default function RekordboxReader() { const resizeRef = useRef<{ startX: number; startWidth: number } | null>(null); // Get the current playlist from URL or default to "All Songs" - const currentPlaylist = location.pathname === "/" - ? "All Songs" - : decodeURIComponent(location.pathname.slice(1)); + const currentPlaylist = location.pathname.startsWith("/playlists/") + ? decodeURIComponent(location.pathname.slice("/playlists/".length)) + : "All Songs"; useEffect(() => { // Only run this check after the initial data load @@ -154,7 +154,7 @@ export default function RekordboxReader() { } else { // Use encodeURIComponent to properly handle spaces and special characters const encodedName = encodeURIComponent(name); - navigate(`/${encodedName}`); + navigate(`/playlists/${encodedName}`); } };