Scaffold frontend/modules/loyalty with types, API client, design system, feature pages, and thin App Router routes. Wire all screens to backend Loyalty service via BFF proxy. Add loyalty docs and update progress. Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
514 B
TypeScript
16 lines
514 B
TypeScript
"use client";
|
|
|
|
import { useQuery } from "@tanstack/react-query";
|
|
import { hospitalityApi } from "@/modules/hospitality/services/hospitality-api";
|
|
import { useTenantId } from "@/hooks/useTenantId";
|
|
|
|
export function useHospitalityVenues() {
|
|
const { tenantId } = useTenantId();
|
|
return useQuery({
|
|
queryKey: ["hospitality", tenantId, "venues-options"],
|
|
queryFn: () => hospitalityApi.venues.list(tenantId!, { page: 1, page_size: 500 }),
|
|
enabled: !!tenantId,
|
|
staleTime: 60_000,
|
|
});
|
|
}
|