Remove persisted playqueue in localstorage

- This will break if there are enough songs in the queue. A new implementation will be added in the future
This commit is contained in:
jeffvli 2023-01-07 01:42:20 -08:00
parent 3bbddcf092
commit 2f7f6bead9

View file

@ -746,6 +746,12 @@ export const usePlayerStore = create<PlayerSlice>()(
return merge(currentState, persistedState); return merge(currentState, persistedState);
}, },
name: 'store_player', name: 'store_player',
partialize: (state) => {
const notPersisted = ['queue', 'current'];
return Object.fromEntries(
Object.entries(state).filter(([key]) => !notPersisted.includes(key)),
);
},
version: 1, version: 1,
}, },
), ),