mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-05 07:44:38 +00:00
refactor: change types from Map to Record in playerStore
This commit is contained in:
parent
2fb6fe47e0
commit
57245d99b7
1 changed files with 4 additions and 4 deletions
|
@ -3,8 +3,8 @@ import { create } from "zustand";
|
|||
import { persist } from "zustand/middleware";
|
||||
|
||||
interface userPlayerPreferencesState {
|
||||
voiceover: Map<number, string>;
|
||||
player: Map<number, string>;
|
||||
voiceover: Record<number, string>;
|
||||
player: Record<number, string>;
|
||||
getPreferredVoiceover: (id: number) => (string | undefined);
|
||||
setPreferredVoiceover: (id: number, voiceover: string) => void;
|
||||
getPreferredPlayer: (id: number) => (string | undefined);
|
||||
|
@ -14,8 +14,8 @@ interface userPlayerPreferencesState {
|
|||
export const useUserPlayerPreferencesStore = create<userPlayerPreferencesState>()(
|
||||
persist(
|
||||
(set, get) => ({
|
||||
voiceover: new Map<number, string>(),
|
||||
player: new Map<number, string>(),
|
||||
voiceover: {},
|
||||
player: {},
|
||||
getPreferredVoiceover: (id: number) => get().voiceover[id],
|
||||
setPreferredVoiceover: (id: number, voiceover: string) => {
|
||||
let current = get().voiceover
|
||||
|
|
Loading…
Add table
Reference in a new issue