1+ import _ from "lodash" ;
12import { FC , useEffect } from "react" ;
2- import ControlBar from "./ControlBar " ;
3+ import { useRecoilState } from "recoil " ;
34import {
45 useCurrentlyPlayingSongSubscription ,
56 useGetCurrentTrackQuery ,
@@ -17,15 +18,14 @@ import {
1718 useSeekMutation ,
1819 useUnlikeTrackMutation ,
1920} from "../../Hooks/GraphQL" ;
20- import { CurrentTrack } from "../../Types/track" ;
21- import _ from "lodash" ;
22- import { useRecoilState } from "recoil" ;
23- import { controlBarState } from "./ControlBarState" ;
2421import { usePlayQueue } from "../../Hooks/usePlayQueue" ;
2522import { useResumePlaylist } from "../../Hooks/useResumePlaylist" ;
23+ import { useSettings } from "../../Hooks/useSettings" ;
24+ import { CurrentTrack } from "../../Types/track" ;
2625import { likesState } from "../Likes/LikesState" ;
2726import { settingsState } from "../Settings/SettingsState" ;
28- import { useSettings } from "../../Hooks/useSettings" ;
27+ import ControlBar from "./ControlBar" ;
28+ import { controlBarState } from "./ControlBarState" ;
2929
3030const ControlBarWithData : FC = ( ) => {
3131 const [ { nowPlaying, locked, resumeIndex } , setControlBarState ] =
@@ -120,7 +120,7 @@ const ControlBarWithData: FC = () => {
120120 cover : currentSong ?. albumArt
121121 ? currentSong ?. albumArt . startsWith ( "http" )
122122 ? currentSong . albumArt
123- : `http://localhost:6062 /covers/${ currentSong ?. albumArt } `
123+ : `${ location . protocol } // ${ location . host } /covers/${ currentSong ?. albumArt } `
124124 : "" ,
125125 duration : currentSong ?. length || 0 ,
126126 progress : currentSong ?. elapsed || 0 ,
@@ -150,7 +150,7 @@ const ControlBarWithData: FC = () => {
150150 cover : data . currentTrack ?. albumArt
151151 ? data . currentTrack ?. albumArt . startsWith ( "http" )
152152 ? data . currentTrack ?. albumArt
153- : `http://localhost:6062 /covers/${ data . currentTrack ?. albumArt } `
153+ : `${ location . protocol } // ${ location . host } /covers/${ data . currentTrack ?. albumArt } `
154154 : "" ,
155155 duration : data . currentTrack ?. length || 0 ,
156156 progress : data . currentTrack ?. elapsed || 0 ,
0 commit comments