chore: clean up placeholder comments and over-engineering

This commit is contained in:
zetaloop
2026-02-20 20:20:22 +08:00
parent e12500fafd
commit a4e05cf482
4 changed files with 25 additions and 30 deletions
+1 -3
View File
@@ -6,10 +6,9 @@ type PlayerStatus = Player["status"]
interface PlayerStatusState {
statuses: Record<string, PlayerStatus>
setStatus: (playerId: string, status: PlayerStatus) => void
getStatus: (playerId: string) => PlayerStatus | undefined
}
export const usePlayerStatusStore = create<PlayerStatusState>((set, get) => ({
export const usePlayerStatusStore = create<PlayerStatusState>((set) => ({
statuses: {
u2: "available",
u4: "busy",
@@ -19,5 +18,4 @@ export const usePlayerStatusStore = create<PlayerStatusState>((set, get) => ({
set((state) => ({
statuses: { ...state.statuses, [playerId]: status },
})),
getStatus: (playerId) => get().statuses[playerId],
}))