16 lines
666 B
TypeScript
16 lines
666 B
TypeScript
import { DayEarning } from '@app-types/index';
|
|
import { mockWeeklyEarnings, mockTodayEarnings } from '@store/mockData/mockEarnings';
|
|
// import apiClient from '../services/apiClient'; // Used when connecting to real backend
|
|
|
|
export const getTodayEarnings = async (): Promise<typeof mockTodayEarnings> => {
|
|
// return (await apiClient.get('/earnings/today')).data;
|
|
await new Promise<void>((r) => setTimeout(r, 500));
|
|
return mockTodayEarnings;
|
|
};
|
|
|
|
export const getWeeklyEarnings = async (): Promise<DayEarning[]> => {
|
|
// return (await apiClient.get('/earnings/weekly')).data;
|
|
await new Promise<void>((r) => setTimeout(r, 500));
|
|
return mockWeeklyEarnings;
|
|
};
|