refactor(data): add mock API adapters, id utility, and toast feedback
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { usePlayerStore } from "@/store/players"
|
||||
|
||||
export function listPlayers() {
|
||||
return usePlayerStore.getState().players
|
||||
}
|
||||
|
||||
export function getPlayerById(playerId: string) {
|
||||
return usePlayerStore.getState().players.find((player) => player.id === playerId)
|
||||
}
|
||||
|
||||
export function listPlayersByShop(shopId: string) {
|
||||
return usePlayerStore.getState().players.filter((player) => player.shopId === shopId)
|
||||
}
|
||||
Reference in New Issue
Block a user