fix(playlists): clear the detail panel after deleting the selected playlist

The detail pane rendered from react-query's cached data, so deleting the selected
playlist emptied the rail but left its stale contents on the right. Gate the detail
view on the current selection so it falls back to the empty state when nothing (or a
just-deleted playlist) is selected.
This commit is contained in:
npeter83 2026-06-15 14:56:39 +02:00
parent 81e28b083d
commit 201ec4c3fb

View file

@ -236,7 +236,7 @@ export default function Playlists() {
</aside> </aside>
<main className="flex-1 min-w-0 overflow-y-auto p-4"> <main className="flex-1 min-w-0 overflow-y-auto p-4">
{!detail ? ( {selectedId == null || !detail ? (
<div className="text-muted text-sm p-4"> <div className="text-muted text-sm p-4">
{selectedId == null ? t("playlists.pickOne") : t("playlists.loading")} {selectedId == null ? t("playlists.pickOne") : t("playlists.loading")}
</div> </div>