Add admin order details modal and improve admin UI
Introduces an admin-only OrderDetailsModal component for viewing and managing order details, including status updates and transaction info. Updates OrdersTable to support the modal, and enhances the admin dashboard page with lazy loading and skeletons for better UX. Also fixes API client base URL handling for /api prefix.
This commit is contained in:
@@ -282,7 +282,9 @@ export async function fetchClient<T>(
|
||||
}
|
||||
} else {
|
||||
// For direct API calls, construct full URL
|
||||
url = `${apiUrl}${normalizedEndpoint}`;
|
||||
// Ensure /api prefix is included if apiUrl doesn't already have it
|
||||
const baseUrl = apiUrl.endsWith('/api') ? apiUrl : `${apiUrl}/api`;
|
||||
url = `${baseUrl}${normalizedEndpoint}`;
|
||||
}
|
||||
|
||||
// Get auth token from cookies
|
||||
|
||||
Reference in New Issue
Block a user