export const dynamic = "force-dynamic";

import { requireTenant } from "@/lib/appwrite/tenant-guard";
import { listCustomers } from "@/lib/appwrite/customer-queries";
import { CustomersClient } from "@/components/customers/customers-client";

export default async function CustomersPage() {
  const ctx = await requireTenant();
  const customers = await listCustomers(ctx.tenantId);

  return (
    <div className="flex flex-1 flex-col gap-4 p-4 md:p-6">
      <CustomersClient initialCustomers={customers} />
    </div>
  );
}
