mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-25 00:23:04 +00:00
Potential fix for pull request finding 'CodeQL / Unused variable, import, function or class'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
parent
71640f062c
commit
cc43d09d79
@@ -26,9 +26,6 @@ export function RegenerateKeyModal({ selectedToken, visible, onClose, onKeyUpdat
|
||||
const [isRegenerating, setIsRegenerating] = useState(false);
|
||||
const [copied, setCopied] = useState(false);
|
||||
|
||||
// Track whether this is the user's own authentication key
|
||||
const [isOwnKey, setIsOwnKey] = useState<boolean>(false);
|
||||
|
||||
// Keep track of the current valid access token locally
|
||||
const [currentAccessToken, setCurrentAccessToken] = useState<string | null>(null);
|
||||
|
||||
@@ -45,10 +42,6 @@ export function RegenerateKeyModal({ selectedToken, visible, onClose, onKeyUpdat
|
||||
|
||||
// Initialize the current access token
|
||||
setCurrentAccessToken(accessToken);
|
||||
|
||||
// Check if this is the user's own authentication key by comparing the key values
|
||||
const isUserOwnKey = selectedToken.key_name === accessToken;
|
||||
setIsOwnKey(isUserOwnKey);
|
||||
}
|
||||
}, [visible, selectedToken, form, accessToken]);
|
||||
|
||||
@@ -57,7 +50,6 @@ export function RegenerateKeyModal({ selectedToken, visible, onClose, onKeyUpdat
|
||||
// Reset states when modal is closed
|
||||
setRegeneratedKey(null);
|
||||
setIsRegenerating(false);
|
||||
setIsOwnKey(false);
|
||||
setCurrentAccessToken(null);
|
||||
setCopied(false);
|
||||
form.resetFields();
|
||||
|
||||
Reference in New Issue
Block a user