diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/SigningKeys/index.tsx b/packages/console/src/pages/TenantSettings/TenantBasicSettings/SigningKeys/index.tsx index 0fe1c7e1105..9cbd282737b 100644 --- a/packages/console/src/pages/TenantSettings/TenantBasicSettings/SigningKeys/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/SigningKeys/index.tsx @@ -27,8 +27,8 @@ function SigningKeys() { const api = useApi(); const { t } = useTranslation(undefined, { keyPrefix: 'admin_console.tenants.signing_keys' }); const [activeTab, setActiveTab] = useState(LogtoOidcConfigKey.PrivateKeys); - const keyType = activeTab === LogtoOidcConfigKey.PrivateKeys ? 'private-keys' : 'cookie-keys'; - const entities = activeTab === LogtoOidcConfigKey.PrivateKeys ? 'tokens' : 'cookies'; + const isPrivateKey = activeTab === LogtoOidcConfigKey.PrivateKeys; + const keyType = isPrivateKey ? 'private-keys' : 'cookie-keys'; const { data, error, mutate } = useSWR( `api/configs/oidc/${keyType}` @@ -55,13 +55,13 @@ function SigningKeys() { dataIndex: 'status', colSpan: 4, render: (_: OidcConfigKeysResponse, rowIndex: number) => ( - + {t(rowIndex === 0 ? 'status.current' : 'status.previous')} ), }, ...condArray( - activeTab === LogtoOidcConfigKey.PrivateKeys && [ + isPrivateKey && [ { title: t('table_column.algorithm'), dataIndex: 'signingKeyAlgorithm', @@ -90,7 +90,7 @@ function SigningKeys() { ), }, ], - [activeTab, t] + [isPrivateKey, t] ); return ( @@ -113,7 +113,7 @@ function SigningKeys() { - + - +
- {t('rotate_private_keys_description', { entities })} + {t(`rotate_${isPrivateKey ? 'private' : 'cookie'}_keys_description`)}