import MontonioCallbackClient from './client-component';

export default async function MontonioCallbackPage({
  searchParams,
}: {
  searchParams: Promise<{
    'order-token'?: string;
  }>;
}) {
  const orderToken = (await searchParams)['order-token'];

  if (!orderToken) {
    return <MontonioCallbackClient error="Order token is missing" />;
  }

  return <MontonioCallbackClient orderToken={orderToken} />;
}
