refactor(data): add mock API adapters, id utility, and toast feedback
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { useOrderStore } from "@/store/orders"
|
||||
|
||||
export function listOrders() {
|
||||
return useOrderStore.getState().orders
|
||||
}
|
||||
|
||||
export function getOrderById(orderId: string) {
|
||||
return useOrderStore.getState().orders.find((order) => order.id === orderId)
|
||||
}
|
||||
|
||||
export function listOrdersByConsumer(consumerId: string) {
|
||||
return useOrderStore.getState().orders.filter((order) => order.consumerId === consumerId)
|
||||
}
|
||||
Reference in New Issue
Block a user