fix(ui/): fix linting errors

This commit is contained in:
Krrish Dholakia 2025-06-05 15:17:30 -07:00
parent 30f1c5e852
commit ab9d09a464
9 changed files with 23 additions and 4 deletions

View file

@ -432,6 +432,7 @@ export default function CreateKeyPage() {
userRole={userRole}
accessToken={accessToken}
teams={(teams as Team[]) ?? []}
premiumUser={premiumUser}
/>
) : (
<Usage

View file

@ -66,6 +66,7 @@ interface AllKeysTableProps {
sortBy: string;
sortOrder: 'asc' | 'desc';
};
premiumUser: boolean;
}
// Define columns similar to our logs table
@ -140,6 +141,7 @@ export function AllKeysTable({
refresh,
onSortChange,
currentSort,
premiumUser,
}: AllKeysTableProps) {
const [selectedKeyId, setSelectedKeyId] = useState<string | null>(null);
const [userList, setUserList] = useState<UserResponse[]>([]);
@ -606,6 +608,7 @@ export function AllKeysTable({
userID={userID}
userRole={userRole}
teams={allTeams}
premiumUser={premiumUser}
/>
) : (
<div className="border-b py-4 flex-1 overflow-hidden">

View file

@ -61,6 +61,7 @@ interface EntityUsageProps {
userID: string | null;
userRole: string | null;
entityList: EntityList[] | null;
premiumUser: boolean;
}
const EntityUsage: React.FC<EntityUsageProps> = ({
@ -69,7 +70,8 @@ const EntityUsage: React.FC<EntityUsageProps> = ({
entityId,
userID,
userRole,
entityList
entityList,
premiumUser
}) => {
const [spendData, setSpendData] = useState<EntitySpendData>({
results: [],
@ -472,6 +474,7 @@ const EntityUsage: React.FC<EntityUsageProps> = ({
userID={userID}
userRole={userRole}
teams={null}
premiumUser={premiumUser}
/>
</Card>
</Col>

View file

@ -33,13 +33,15 @@ interface NewUsagePageProps {
userRole: string | null;
userID: string | null;
teams: Team[];
premiumUser: boolean;
}
const NewUsagePage: React.FC<NewUsagePageProps> = ({
accessToken,
userRole,
userID,
teams
teams,
premiumUser
}) => {
const [userSpendData, setUserSpendData] = useState<{
results: DailyData[];
@ -386,6 +388,7 @@ const NewUsagePage: React.FC<NewUsagePageProps> = ({
userID={userID}
userRole={userRole}
teams={null}
premiumUser={premiumUser}
/>
</Card>
</Col>
@ -506,6 +509,7 @@ const NewUsagePage: React.FC<NewUsagePageProps> = ({
label: team.team_alias,
value: team.team_id
})) || null}
premiumUser={premiumUser}
/>
</TabPanel>
@ -517,6 +521,7 @@ const NewUsagePage: React.FC<NewUsagePageProps> = ({
userID={userID}
userRole={userRole}
entityList={allTags}
premiumUser={premiumUser}
/>
</TabPanel>

View file

@ -11,6 +11,7 @@ interface RegenerateKeyModalProps {
visible: boolean;
onClose: () => void;
accessToken: string | null;
premiumUser: boolean;
}
export function RegenerateKeyModal({
@ -18,6 +19,7 @@ export function RegenerateKeyModal({
visible,
onClose,
accessToken,
premiumUser,
}: RegenerateKeyModalProps) {
const [form] = Form.useForm();
const [regeneratedKey, setRegeneratedKey] = useState<string | null>(null);

View file

@ -13,6 +13,7 @@ interface TopKeyViewProps {
userID: string | null;
userRole: string | null;
teams: any[] | null;
premiumUser: boolean;
}
const TopKeyView: React.FC<TopKeyViewProps> = ({
@ -20,7 +21,8 @@ const TopKeyView: React.FC<TopKeyViewProps> = ({
accessToken,
userID,
userRole,
teams
teams,
premiumUser
}) => {
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
const [selectedKey, setSelectedKey] = useState<string | null>(null);
@ -193,6 +195,7 @@ const TopKeyView: React.FC<TopKeyViewProps> = ({
userID={userID}
userRole={userRole}
teams={teams}
premiumUser={premiumUser}
/>
</div>
</div>

View file

@ -660,6 +660,7 @@ const UsagePage: React.FC<UsagePageProps> = ({
userID={userID}
userRole={userRole}
teams={null}
premiumUser={premiumUser}
/>
</Card>
</Col>

View file

@ -393,6 +393,7 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
refresh={refresh}
selectedKeyAlias={selectedKeyAlias}
setSelectedKeyAlias={setSelectedKeyAlias}
premiumUser={premiumUser}
/>
{isDeleteModalOpen && (

View file

@ -471,7 +471,7 @@ export default function SpendLogsTable({
</h1>
</div>
{selectedKeyInfo && selectedKeyIdInfoView && selectedKeyInfo.api_key === selectedKeyIdInfoView ? (
<KeyInfoView keyId={selectedKeyIdInfoView} keyData={selectedKeyInfo} accessToken={accessToken} userID={userID} userRole={userRole} teams={allTeams} onClose={() => setSelectedKeyIdInfoView(null)} />
<KeyInfoView keyId={selectedKeyIdInfoView} keyData={selectedKeyInfo} accessToken={accessToken} userID={userID} userRole={userRole} teams={allTeams} onClose={() => setSelectedKeyIdInfoView(null)} premiumUser={premiumUser}/>
) : selectedSessionId ? (
<div className="bg-white rounded-lg shadow">
<DataTable