import { Suspense } from 'react';
import { notFound } from 'next/navigation';
import { BrandWalletDetail } from '@/modules/marketplace-admin/money/BrandWalletDetail';

export default async function BrandWalletDetailPage({
  params,
}: {
  params: Promise<{ brandId: string }>;
}) {
  const { brandId } = await params;
  const id = Number(brandId);
  if (!Number.isFinite(id) || id < 1) notFound();

  return (
    <div className="container mx-auto py-6 max-w-7xl">
      <Suspense fallback={<div>Loading…</div>}>
        <BrandWalletDetail brandId={id} />
      </Suspense>
    </div>
  );
}
