refactor(data): add mock API adapters, id utility, and toast feedback
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { useServiceStore } from "@/store/services"
|
||||
|
||||
export function listServices() {
|
||||
return useServiceStore.getState().services
|
||||
}
|
||||
|
||||
export function getServiceById(serviceId: string) {
|
||||
return useServiceStore.getState().services.find((service) => service.id === serviceId)
|
||||
}
|
||||
|
||||
export function listServicesByPlayer(playerId: string) {
|
||||
return useServiceStore.getState().services.filter((service) => service.playerId === playerId)
|
||||
}
|
||||
Reference in New Issue
Block a user