import { getCurrentCustomer } from '@/lib/auth';
import CheckoutPageClient from './client';

export default async function CheckoutPage() {
  let customer = null;
  try {
    customer = await getCurrentCustomer();
  } catch (err) {
    console.error('Error fetching customer for checkout:', err);
  }

  return <CheckoutPageClient isLoggedIn={!!customer} customer={customer} />;
}
