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:
parent
81e28b083d
commit
201ec4c3fb
1 changed files with 1 additions and 1 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue