Replace apiRequest with clientFetch across app
Refactored all API calls to use the new clientFetch utility instead of apiRequest in dashboard pages, modal components, and profit analytics service. This improves consistency and aligns with updated API handling patterns.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { apiRequest } from '../api';
|
||||
import { clientFetch } from '../api';
|
||||
|
||||
export interface ProfitOverview {
|
||||
period: string;
|
||||
@@ -63,7 +63,7 @@ export const getProfitOverview = async (
|
||||
url += `?period=${period}`;
|
||||
}
|
||||
|
||||
return apiRequest(url);
|
||||
return clientFetch(url);
|
||||
};
|
||||
|
||||
export const getProfitTrends = async (
|
||||
@@ -82,5 +82,5 @@ export const getProfitTrends = async (
|
||||
url += `?period=${period}`;
|
||||
}
|
||||
|
||||
return apiRequest(url);
|
||||
return clientFetch(url);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user