diff --git a/web/src/components/LibraryPanel.tsx b/web/src/components/LibraryPanel.tsx index 08801f2..1faa97b 100644 --- a/web/src/components/LibraryPanel.tsx +++ b/web/src/components/LibraryPanel.tsx @@ -277,13 +277,10 @@ export function LibraryPanel({ bandId, selectedSongId, onSelectSong }: LibraryPa return (
diff --git a/web/src/pages/BandPage.tsx b/web/src/pages/BandPage.tsx index afb4514..8345fbb 100755 --- a/web/src/pages/BandPage.tsx +++ b/web/src/pages/BandPage.tsx @@ -1,28 +1,9 @@ -import { useState, useEffect } from "react"; import { useParams, useSearchParams } from "react-router-dom"; import { useQuery } from "@tanstack/react-query"; import { getBand } from "../api/bands"; import { LibraryPanel } from "../components/LibraryPanel"; import { PlayerPanel } from "../components/PlayerPanel"; -// ── Empty player state ──────────────────────────────────────────────────────── - -function EmptyPlayer() { - return ( -
-
- - - - -
-

- Select a track from the library to start listening -

-
- ); -} - // ── BandPage ────────────────────────────────────────────────────────────────── export function BandPage() { @@ -31,15 +12,6 @@ export function BandPage() { // selectedSongId is kept in URL as ?song= so deep-links and browser back work const selectedSongId = searchParams.get("song"); - const [isMobile, setIsMobile] = useState(false); - - useEffect(() => { - const check = () => setIsMobile(window.innerWidth < 900); - check(); - window.addEventListener("resize", check); - return () => window.removeEventListener("resize", check); - }, []); - const { data: band, isLoading } = useQuery({ queryKey: ["band", bandId], queryFn: () => getBand(bandId!), @@ -57,52 +29,26 @@ export function BandPage() { if (isLoading) return
Loading…
; if (!band || !bandId) return
Band not found
; - // ── Mobile: show library OR player, not both ────────────────────────────── - - if (isMobile) { - if (selectedSongId) { - return ( -
- -
- ); - } + if (selectedSongId) { return (
- -
- ); - } - - // ── Desktop: three-panel (Sidebar is handled by AppShell, we add Library + Player) ── - - return ( -
- - - {selectedSongId ? ( - ) : ( - - )} +
+ ); + } + + return ( +
+
); }