fix: when credential unauthrozied display green color (#24572)
This commit is contained in:
@@ -81,12 +81,12 @@ const CredentialPanel = ({
|
|||||||
}, [authorized, authRemoved, current_credential_name, hasCredential])
|
}, [authorized, authRemoved, current_credential_name, hasCredential])
|
||||||
|
|
||||||
const color = useMemo(() => {
|
const color = useMemo(() => {
|
||||||
if (authRemoved)
|
if (authRemoved || !hasCredential)
|
||||||
return 'red'
|
return 'red'
|
||||||
if (notAllowedToUse)
|
if (notAllowedToUse)
|
||||||
return 'gray'
|
return 'gray'
|
||||||
return 'green'
|
return 'green'
|
||||||
}, [authRemoved, notAllowedToUse])
|
}, [authRemoved, notAllowedToUse, hasCredential])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
Reference in New Issue
Block a user