-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMiniPlayerApp.tsx
More file actions
33 lines (32 loc) · 1.16 KB
/
MiniPlayerApp.tsx
File metadata and controls
33 lines (32 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { ThemeProvider } from "./contexts/ThemeContext";
import { PlayerProvider } from "./contexts/PlayerContext";
import { ProfileProvider } from "./contexts/ProfileContext";
import { SpotifyProvider } from "./contexts/SpotifyContext";
import { MiniPlayer } from "./components/views/MiniPlayer";
/**
* Minimal provider tree for the mini-player webview. Skips the
* Library / Playlist contexts since the mini-player only displays
* the current track + playback controls — no library browsing.
*
* SpotifyProvider stays in because PlayerProvider calls useSpotify()
* unconditionally (provider routing happens inside PlayerContext).
* Without it the mini boots into a white screen via the "must be
* used within SpotifyProvider" throw.
*
* The PlayerProvider hooks into the same backend AppState as the
* main window via tauri events, so playback stays in sync without
* any bridging code.
*/
export function MiniPlayerApp() {
return (
<ThemeProvider>
<ProfileProvider>
<SpotifyProvider>
<PlayerProvider>
<MiniPlayer />
</PlayerProvider>
</SpotifyProvider>
</ProfileProvider>
</ThemeProvider>
);
}