import Link from "next/link"; import type { Metadata } from "next"; import { formatMoney } from "@salixcommerce/core"; import { CheckoutForm } from "@/components/checkout-form"; import { EmptyState, Hero, Notification, PageContainer } from "@/components/ui"; import { applicationConfiguration } from "@/config/public"; import { loadCurrentCart } from "@/server/commerce/current-commerce"; export const metadata: Metadata = { title: "Order details" }; export const dynamic = "force-dynamic"; export default async function CheckoutPage() { const cart = await loadCurrentCart(); if (cart === null || cart.lines.length === 0) { return ( Browse products } description="Add an available product option, then return here." title="Nothing to order" /> ); } if (cart.lines.some((line) => !line.purchasable)) { return (

Remove unavailable items before creating an order.

Return to cart
); } return (

This step creates an operational order and reserves tracked stock. It does not itself collect payment or infer tax and shipping policy.

); }