fix(dashboard): scope owner and service views by resolved shop
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
import type { Shop } from "@/lib/types"
|
||||
|
||||
export function resolveOwnerShop(userId: string | undefined, shops: Shop[]): Shop | null {
|
||||
if (!userId) return null
|
||||
return shops.find((shop) => shop.owner.id === userId) ?? null
|
||||
}
|
||||
Reference in New Issue
Block a user