Обновлено получение данных в компонентах: AgentsBarChart, AgentsTable, BillingPayoutsTable, BillingPieChart, BillingStatChart, PayoutsTransactionsTable, ReferralsTable, RevenueChart и SalesTable. Теперь данные извлекаются из свойства items ответа API, что улучшает обработку данных и предотвращает возможные ошибки.

This commit is contained in:
Redsandyg
2025-06-07 14:15:13 +03:00
parent 410410bc85
commit 14921074a5
9 changed files with 100 additions and 22 deletions

View File

@@ -29,7 +29,7 @@ const BillingPieChart: React.FC = () => {
})
.then((res) => res.json())
.then((apiData) => {
const mapped = apiData.map((item: { status: string; count: number }) => ({
const mapped = apiData.items.map((item: { status: string; count: number }) => ({
name: item.status,
value: item.count,
fill: STATUS_COLORS[item.status] || "#A3A3A3",