diff --git a/src/actions/stops.ts b/src/actions/stops.ts index fe7eb71..7ba7aa3 100644 --- a/src/actions/stops.ts +++ b/src/actions/stops.ts @@ -87,4 +87,33 @@ export async function publishStop( } return { success: true }; +} + +/** + * Fetch active stops for sitemap generation. + * This is a public function that doesn't require authentication. + */ +export type StopForSitemap = { + slug: string; + brand_slug: string; + last_modified: string; +}; + +export async function getActiveStopsForSitemap(): Promise { + const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL!; + const supabaseKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!; + + // Get all active stops with their brand slug + const response = await fetch( + `${supabaseUrl}/rest/v1/rpc/get_active_stops_with_brand`, + { + method: "POST", + headers: { ...svcHeaders(supabaseKey), "Content-Type": "application/json" }, + } + ); + + if (!response.ok) return []; + + const stops = await response.json(); + return Array.isArray(stops) ? stops : []; } \ No newline at end of file diff --git a/src/app/admin/settings/billing/BillingClient.tsx b/src/app/admin/settings/billing/BillingClient.tsx index 10189ea..d44b557 100644 --- a/src/app/admin/settings/billing/BillingClient.tsx +++ b/src/app/admin/settings/billing/BillingClient.tsx @@ -41,7 +41,7 @@ export default function BillingClient({ currentTier, brandId }: Props) { setForm({ ...form, name: e.target.value })} + className="w-full rounded-xl border-2 border-[#e5e5e5] bg-white px-5 py-4 text-base text-[#1a1a1a] placeholder:text-[#999] outline-none focus:border-[#1a4d2e] focus:ring-4 focus:ring-[#1a4d2e]/10 transition-colors" + placeholder="Jane Smith" + /> + +
+ + setForm({ ...form, email: e.target.value })} + className="w-full rounded-xl border-2 border-[#e5e5e5] bg-white px-5 py-4 text-base text-[#1a1a1a] placeholder:text-[#999] outline-none focus:border-[#1a4d2e] focus:ring-4 focus:ring-[#1a4d2e]/10 transition-colors" + placeholder="jane@example.com" + /> +
+ + +
+ + +
+ +
+ +