mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
(feat) view userID on navbar
This commit is contained in:
parent
758da80e5f
commit
c93e5ec32a
3 changed files with 13 additions and 5 deletions
|
@ -4,8 +4,7 @@ import UserDashboard from "../components/user_dashboard";
|
||||||
const CreateKeyPage = () => {
|
const CreateKeyPage = () => {
|
||||||
return (
|
return (
|
||||||
<Suspense fallback={<div>Loading...</div>}>
|
<Suspense fallback={<div>Loading...</div>}>
|
||||||
<div className="flex min-h-screen flex-col items-center">
|
<div className="flex min-h-screen flex-col ">
|
||||||
<Navbar />
|
|
||||||
<UserDashboard />
|
<UserDashboard />
|
||||||
</div>
|
</div>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
*/
|
*/
|
||||||
import { message } from 'antd';
|
import { message } from 'antd';
|
||||||
|
|
||||||
const proxyBaseUrl = null
|
// const proxyBaseUrl = null;
|
||||||
|
const proxyBaseUrl = "http://localhost:4000" // http://localhost:4000
|
||||||
|
|
||||||
export const keyCreateCall = async (
|
export const keyCreateCall = async (
|
||||||
accessToken: string,
|
accessToken: string,
|
||||||
|
|
|
@ -5,10 +5,12 @@ import { Grid, Col, Card, Text } from "@tremor/react";
|
||||||
import CreateKey from "./create_key_button";
|
import CreateKey from "./create_key_button";
|
||||||
import ViewKeyTable from "./view_key_table";
|
import ViewKeyTable from "./view_key_table";
|
||||||
import EnterProxyUrl from "./enter_proxy_url";
|
import EnterProxyUrl from "./enter_proxy_url";
|
||||||
|
import Navbar from "./navbar";
|
||||||
import { useSearchParams } from "next/navigation";
|
import { useSearchParams } from "next/navigation";
|
||||||
import { jwtDecode } from "jwt-decode";
|
import { jwtDecode } from "jwt-decode";
|
||||||
|
|
||||||
const proxyBaseUrl = null
|
// const proxyBaseUrl = null;
|
||||||
|
const proxyBaseUrl = "http://localhost:4000" // http://localhost:4000
|
||||||
|
|
||||||
const UserDashboard = () => {
|
const UserDashboard = () => {
|
||||||
const [data, setData] = useState<null | any[]>(null); // Keep the initialization of state here
|
const [data, setData] = useState<null | any[]>(null); // Keep the initialization of state here
|
||||||
|
@ -67,7 +69,11 @@ const UserDashboard = () => {
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid numItems={1} className="gap-0 p-10 h-[75vh] w-full">
|
<div>
|
||||||
|
<Navbar
|
||||||
|
userID={userID}
|
||||||
|
/>
|
||||||
|
<Grid numItems={1} className="gap-0 p-10 h-[75vh] w-full">
|
||||||
<Col numColSpan={1}>
|
<Col numColSpan={1}>
|
||||||
<ViewKeyTable
|
<ViewKeyTable
|
||||||
userID={userID}
|
userID={userID}
|
||||||
|
@ -83,6 +89,8 @@ const UserDashboard = () => {
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</div>
|
||||||
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue