diff --git a/shop/components/admin/recent-orders.tsx b/shop/components/admin/recent-orders.tsx index 290aa06..5fb7be5 100644 --- a/shop/components/admin/recent-orders.tsx +++ b/shop/components/admin/recent-orders.tsx @@ -40,7 +40,8 @@ export function AdminRecentOrders() { const fetchOrders = async () => { try { - const res = await fetch('/api/admin/recent-orders', { cache: 'no-store' }) + const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000'; + const res = await fetch(`${baseUrl}/api/admin/recent-orders`, { cache: 'no-store' }); if (!res.ok) return const { orders: fresh } = await res.json()