Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
447 Bytes
import { create } from 'zustand';
interface PlayerStore {
ids: string[];
activeId?: string;
setId: (id: string) => void;
setIds: (ids: string[]) => void;
reset: () => void;
}
const usePlayer = create<PlayerStore>((set) => ({
ids: [],
activeId: undefined,
setId: (id: string) => set({ activeId: id }),
setIds: (ids: string[]) => set({ ids }),
reset: () => set({ ids: [], activeId: undefined })
}));
export default usePlayer;