forked from phoenix/litellm-mirror
fix(user_dashboard.tsx): don't call /global/spend on startup (#5668)
at 1m+ rows, query timeouts cause ui errors
This commit is contained in:
parent
d94d47424f
commit
00047de1c6
1 changed files with 8 additions and 7 deletions
|
@ -182,13 +182,14 @@ const UserDashboard: React.FC<UserDashboardProps> = ({
|
|||
response
|
||||
)}; team values: ${Object.entries(response.teams)}`
|
||||
);
|
||||
if (userRole == "Admin") {
|
||||
const globalSpend = await getTotalSpendCall(accessToken);
|
||||
setUserSpendData(globalSpend);
|
||||
console.log("globalSpend:", globalSpend);
|
||||
} else {
|
||||
setUserSpendData(response["user_info"]);
|
||||
}
|
||||
// if (userRole == "Admin") {
|
||||
// const globalSpend = await getTotalSpendCall(accessToken);
|
||||
// setUserSpendData(globalSpend);
|
||||
// console.log("globalSpend:", globalSpend);
|
||||
// } else {
|
||||
// );
|
||||
// }
|
||||
setUserSpendData(response["user_info"]);
|
||||
setKeys(response["keys"]); // Assuming this is the correct path to your data
|
||||
setTeams(response["teams"]);
|
||||
const teamsArray = [...response["teams"]];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue