From 194934913ee7f9bfa7c33b5f0cf0e3d4be3e323a Mon Sep 17 00:00:00 2001 From: Danel Kungla Date: Thu, 23 Oct 2025 12:27:25 +0300 Subject: [PATCH] fix analysis order page --- .../(dashboard)/order/[orderId]/page.tsx | 28 +++++++++++-------- .../(user)/_components/orders/order-block.tsx | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) 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({