"use client"; import { useAuth } from "@/components/AuthProvider"; import styles from "@/components/BusinessDetailsPage.module.css"; export function BusinessMeshkeeGate({ children, }: { children: (meshkeeId: string) => React.ReactNode; }) { const { activeBusinessId, isLoading, isSuperAdmin } = useAuth(); if (isLoading) { return
Loading…
; } if (!activeBusinessId) { return (

{isSuperAdmin ? "No business selected" : "No business linked"}

{isSuperAdmin ? "Open a listing in the admin dashboard and use Manage business." : "This account has no Meshkee business. Contact support."}

); } return <>{children(activeBusinessId)}; } export function BusinessListHeader({ title, lead, action, }: { title: string; lead: string; action?: React.ReactNode; }) { return (

{title}

{lead}

{action ?
{action}
: null}
); }