diff --git a/ui/litellm-dashboard/src/components/create_key_button.tsx b/ui/litellm-dashboard/src/components/create_key_button.tsx index c06ef8e9e37..f9cf5854d68 100644 --- a/ui/litellm-dashboard/src/components/create_key_button.tsx +++ b/ui/litellm-dashboard/src/components/create_key_button.tsx @@ -11,6 +11,7 @@ const { Option } = Select; interface CreateKeyProps { userID: string; + userRole: string; accessToken: string; data: any[] | null; setData: React.Dispatch>; @@ -18,6 +19,7 @@ interface CreateKeyProps { const CreateKey: React.FC = ({ userID, + userRole, accessToken, data, setData, @@ -74,51 +76,83 @@ const CreateKey: React.FC = ({ onCancel={handleCancel} >
- - + - + + + + - - - - + + + + + + + - - - - + + + + + + + + + + ) : ( + <> + - - - - - - - -
- - Create Key - -
+ + + + + + + + + + ) + } +
+ + Create Key + +
{apiKey && ( diff --git a/ui/litellm-dashboard/src/components/navbar.tsx b/ui/litellm-dashboard/src/components/navbar.tsx index 75b5ada9be4..f775a4138ec 100644 --- a/ui/litellm-dashboard/src/components/navbar.tsx +++ b/ui/litellm-dashboard/src/components/navbar.tsx @@ -9,14 +9,13 @@ import { Button, Text, Metric,Title, TextInput, Grid, Col } from "@tremor/react" // Define the props type interface NavbarProps { userID: string | null; + userRole: string | null; } -const Navbar: React.FC = ({ userID }) => { - const searchParams = useSearchParams(); - const token = searchParams.get("token"); +const Navbar: React.FC = ({ userID, userRole }) => { console.log("User ID:", userID); return ( -