diff --git a/app/home/(user)/(dashboard)/order/[orderId]/page.tsx b/app/home/(user)/(dashboard)/order/[orderId]/page.tsx index 4f5c49d..879f8c9 100644 --- a/app/home/(user)/(dashboard)/order/[orderId]/page.tsx +++ b/app/home/(user)/(dashboard)/order/[orderId]/page.tsx @@ -48,18 +48,22 @@ async function OrderConfirmedPage(props: { : { data: null }, ]); const [{ data: location }, { data: serviceProvider }] = await Promise.all([ - supabaseClient - .schema('medreport') - .from('connected_online_locations') - .select('name,address') - .eq('sync_id', ttoReservation.location_sync_id || 0) - .single(), - supabaseClient - .schema('medreport') - .from('connected_online_providers') - .select('email,phone_number,name') - .eq('id', ttoReservation.clinic_id) - .single(), + ttoReservation + ? supabaseClient + .schema('medreport') + .from('connected_online_locations') + .select('name,address') + .eq('sync_id', ttoReservation.location_sync_id || 0) + .single() + : { data: null }, + ttoReservation + ? supabaseClient + .schema('medreport') + .from('connected_online_providers') + .select('email,phone_number,name') + .eq('id', ttoReservation.clinic_id) + .single() + : { data: null }, ]); return ( diff --git a/app/home/(user)/_components/orders/order-block.tsx b/app/home/(user)/_components/orders/order-block.tsx index abe1519..7ca9da5 100644 --- a/app/home/(user)/_components/orders/order-block.tsx +++ b/app/home/(user)/_components/orders/order-block.tsx @@ -40,7 +40,7 @@ export default function OrderBlock({