import { notFound } from 'next/navigation'; import { prisma } from '@/lib/prisma'; import AdminNav from '@/components/AdminNav'; import { startDesignWithProduct } from './actions'; export default async function StartDesignPage({ params }: { params: { id: string } }) { const request = await prisma.customRequest.findUnique({ where: { id: params.id }, include: { product: true }, }); if (!request) notFound(); const products = await prisma.product.findMany({ where: { showOnPersonalised: true }, orderBy: { name: 'asc' }, }); return (

Start design for this photo

Select which product to design this photo on

Customer's photo

Photo request details

Customer: {request.customerName}

Originally requested for: {request.product.name}

{ 'use server'; await startDesignWithProduct(formData, request.id); }} className="mt-6 space-y-4 border border-line bg-surface p-6">
Cancel
); }