fix(player): render QueueDrawer inside QueryClientProvider so queue LikeButtons resolve — #1928
test-web / test (push) Successful in 40s
test-web / test (push) Successful in 40s
The queue drawer's <aside> is always mounted, so QueueTrackRow's LikeButton (added in #1596) instantiates the moment the queue populates on first play. LikeButton calls useQueryClient() at init; with the drawer outside the provider it threw 'No QueryClient was found in Svelte context', aborting the reactive flush that starts playback — so play appeared to do nothing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -168,9 +168,14 @@
|
||||
style="display: none"
|
||||
></audio>
|
||||
|
||||
<QueueDrawer />
|
||||
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<!-- QueueDrawer must be inside the provider: its rows render LikeButton,
|
||||
which calls useQueryClient() at init. The drawer's <aside> is always
|
||||
mounted, so the moment the queue is populated (on first play) those
|
||||
LikeButtons instantiate — outside the provider they throw
|
||||
"No QueryClient was found" and abort the play flush. -->
|
||||
<QueueDrawer />
|
||||
|
||||
{#if user.value !== null && page.url.pathname !== '/login' && page.url.pathname !== '/now-playing'}
|
||||
<Shell>{@render children()}</Shell>
|
||||
{:else}
|
||||
|
||||
Reference in New Issue
Block a user