File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
apps/pwa/src/pages/player Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,7 @@ export enum Key {
88const storage = new Storage <
99 Key ,
1010 {
11- [ Key . PLAYLIST ] : {
12- userId : string ;
13- musicList : MusicWithSingerAliases [ ] ;
14- } ;
11+ [ Key . PLAYLIST ] : MusicWithSingerAliases [ ] ;
1512 }
1613> ( 'player' ) ;
1714
Original file line number Diff line number Diff line change @@ -6,23 +6,14 @@ import { t } from '@/i18n';
66import { PlaylistMusic } from './constants' ;
77import eventemitter , { EventType } from './eventemitter' ;
88import storage , { Key } from './storage' ;
9- import {
10- getSelectedServer ,
11- getSelectedUser ,
12- useServer ,
13- } from '@/global_states/server' ;
149
1510export default ( ) => {
1611 const [ playlist , setPlaylist ] = useState < PlaylistMusic [ ] > ( [ ] ) ;
1712
1813 useEffect (
1914 ( ) =>
2015 playlist && playlist . length > 0
21- ? void storage . setItem ( Key . PLAYLIST , {
22- userId : getSelectedUser ( getSelectedServer ( useServer . getState ( ) ) ! ) !
23- . id ,
24- musicList : playlist ,
25- } )
16+ ? void storage . setItem ( Key . PLAYLIST , playlist )
2617 : undefined ,
2718 [ playlist ] ,
2819 ) ;
You can’t perform that action at this time.
0 commit comments