export const dynamic = "force-dynamic";

import { requireTenant } from "@/lib/appwrite/tenant-guard";
import { listProperties } from "@/lib/appwrite/property-queries";
import { PropertiesClient } from "@/components/properties/properties-client";

export default async function PropertiesPage() {
  const ctx = await requireTenant();
  const properties = await listProperties(ctx.tenantId);

  return (
    <div className="flex flex-1 flex-col gap-4 p-4 md:p-6 overflow-hidden">
      <PropertiesClient initialProperties={properties} />
    </div>
  );
}
