Обновлено получение данных в компонентах: AgentsBarChart, AgentsTable, BillingPayoutsTable, BillingPieChart, BillingStatChart, PayoutsTransactionsTable, ReferralsTable, RevenueChart и SalesTable. Теперь данные извлекаются из свойства items ответа API, что улучшает обработку данных и предотвращает возможные ошибки.
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user