feat: bootstrap temporserv project scaffold
Add the initial project blueprint, Go backend skeleton, frontend app shell, database schema draft, and local development/deployment files.
This commit is contained in:
16
apps/web/src/stores/player-store.ts
Normal file
16
apps/web/src/stores/player-store.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { create } from 'zustand'
|
||||
import type { Track } from '@/lib/api'
|
||||
|
||||
type PlayerState = {
|
||||
currentTrack: Track | null
|
||||
queue: Track[]
|
||||
setQueue: (tracks: Track[]) => void
|
||||
playTrack: (track: Track) => void
|
||||
}
|
||||
|
||||
export const usePlayerStore = create<PlayerState>((set) => ({
|
||||
currentTrack: null,
|
||||
queue: [],
|
||||
setQueue: (queue) => set({ queue, currentTrack: queue[0] ?? null }),
|
||||
playTrack: (currentTrack) => set({ currentTrack }),
|
||||
}))
|
||||
Reference in New Issue
Block a user