14 lines
432 B
TypeScript
14 lines
432 B
TypeScript
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)
|
|
}
|