mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 10:14:26 +00:00
Merge 93da843e83
into b82af5b826
This commit is contained in:
commit
70eba9ad9a
3 changed files with 4 additions and 3 deletions
|
@ -639,6 +639,7 @@ const UsagePage: React.FC<UsagePageProps> = ({
|
|||
userSpend={totalMonthlySpend}
|
||||
selectedTeam={null}
|
||||
userMaxBudget={null}
|
||||
label="Monthly Usage"
|
||||
/>
|
||||
</Col>
|
||||
<Col numColSpan={2}>
|
||||
|
|
|
@ -14,7 +14,6 @@ import { fetchTeams } from "./common_components/fetch_teams";
|
|||
import { Grid, Col, Card, Text, Title } from "@tremor/react";
|
||||
import CreateKey from "./create_key_button";
|
||||
import ViewKeyTable from "./view_key_table";
|
||||
import ViewUserSpend from "./view_user_spend";
|
||||
import ViewUserTeam from "./view_user_team";
|
||||
import DashboardTeam from "./dashboard_default_team";
|
||||
import Onboarding from "../app/onboarding/page";
|
||||
|
|
|
@ -42,8 +42,9 @@ interface ViewUserSpendProps {
|
|||
userSpend: number | null;
|
||||
userMaxBudget: number | null;
|
||||
selectedTeam: any | null;
|
||||
label: string | null;
|
||||
}
|
||||
const ViewUserSpend: React.FC<ViewUserSpendProps> = ({ userID, userRole, accessToken, userSpend, userMaxBudget, selectedTeam }) => {
|
||||
const ViewUserSpend: React.FC<ViewUserSpendProps> = ({ userID, userRole, accessToken, userSpend, userMaxBudget, selectedTeam, label }) => {
|
||||
console.log(`userSpend: ${userSpend}`)
|
||||
let [spend, setSpend] = useState(userSpend !== null ? userSpend : 0.0);
|
||||
const [maxBudget, setMaxBudget] = useState(selectedTeam ? selectedTeam.max_budget : null);
|
||||
|
@ -147,7 +148,7 @@ const ViewUserSpend: React.FC<ViewUserSpendProps> = ({ userID, userRole, accessT
|
|||
<div className="flex justify-between gap-x-6">
|
||||
<div>
|
||||
<p className="text-tremor-default text-tremor-content dark:text-dark-tremor-content">
|
||||
Total Spend
|
||||
{label}
|
||||
</p>
|
||||
<p className="text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold">
|
||||
${roundedSpend}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue