Fix Supabase URL for staging environment and update admin recent orders polling
All checks were successful
Staging Build / build (push) Successful in 3m24s
All checks were successful
Staging Build / build (push) Successful in 3m24s
This commit is contained in:
@@ -42,8 +42,7 @@ export function AdminRecentOrders() {
|
|||||||
|
|
||||||
const fetchOrders = async () => {
|
const fetchOrders = async () => {
|
||||||
try {
|
try {
|
||||||
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000';
|
const res = await fetch('/api/admin/recent-orders', { cache: 'no-store' });
|
||||||
const res = await fetch(`${baseUrl}/api/admin/recent-orders`, { cache: 'no-store' });
|
|
||||||
if (!res.ok) return
|
if (!res.ok) return
|
||||||
const { orders: fresh, chartData: freshChart } = await res.json()
|
const { orders: fresh, chartData: freshChart } = await res.json()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user