refactor(data): add mock API adapters, id utility, and toast feedback
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { useShopStore } from "@/store/shops"
|
||||
|
||||
export function listShops() {
|
||||
return useShopStore.getState().shops
|
||||
}
|
||||
|
||||
export function getShopById(shopId: string) {
|
||||
return useShopStore.getState().shops.find((shop) => shop.id === shopId)
|
||||
}
|
||||
|
||||
export function getShopByOwnerId(ownerId: string) {
|
||||
return useShopStore.getState().shops.find((shop) => shop.owner.id === ownerId)
|
||||
}
|
||||
Reference in New Issue
Block a user