mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-17 08:18:09 +00:00
fix ui linting
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
import React, { useState } from "react";
|
||||
import TopKeyView from "./top_key_view";
|
||||
import KeyInfoView from "./key_info_view";
|
||||
import { KeyResponse } from "./key_team_helpers/key_list";
|
||||
|
||||
interface KeyPageWrapperProps {
|
||||
topKeys: any[];
|
||||
accessToken: string | null;
|
||||
userID: string | null;
|
||||
userRole: string | null;
|
||||
teams: any[] | null;
|
||||
}
|
||||
|
||||
const KeyPageWrapper: React.FC<KeyPageWrapperProps> = ({
|
||||
topKeys,
|
||||
accessToken,
|
||||
userID,
|
||||
userRole,
|
||||
teams,
|
||||
}) => {
|
||||
const [selectedKeyData, setSelectedKeyData] = useState<KeyResponse | null>(null);
|
||||
|
||||
if (selectedKeyData) {
|
||||
return (
|
||||
<div className="h-full w-full">
|
||||
<KeyInfoView
|
||||
keyId={selectedKeyData.token}
|
||||
keyData={selectedKeyData}
|
||||
onClose={() => setSelectedKeyData(null)}
|
||||
accessToken={accessToken}
|
||||
userID={userID}
|
||||
userRole={userRole}
|
||||
teams={teams}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<TopKeyView
|
||||
topKeys={topKeys}
|
||||
accessToken={accessToken}
|
||||
userID={userID}
|
||||
userRole={userRole}
|
||||
onKeySelect={setSelectedKeyData}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default KeyPageWrapper;
|
||||
Reference in New Issue
Block a user