Dwinzo_dev/app/src/store/usePlayButtonStore.ts

12 lines
447 B
TypeScript
Raw Normal View History

2025-03-25 06:17:41 +00:00
import { create } from "zustand";
type PlayButtonStore = {
isPlaying: boolean; // Updated state name to reflect the play/pause status more clearly
setIsPlaying: (value: boolean) => void; // Updated setter function name for clarity
};
export const usePlayButtonStore = create<PlayButtonStore>((set) => ({
isPlaying: false, // Default state for play/pause
setIsPlaying: (value) => set({ isPlaying: value }), // Update isPlaying state
}));