chore: clean up placeholder comments and over-engineering
This commit is contained in:
@@ -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],
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user