Add key props to recent orders list rendering
Some checks failed
Staging Build / build (push) Failing after 26s
Some checks failed
Staging Build / build (push) Failing after 26s
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user