0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

refactor(console): hide WebAuthn user-agent info on user details page (#4706)

This commit is contained in:
Xiao Yijun 2023-10-20 17:36:45 +08:00 committed by GitHub
parent 4402141b0e
commit b5553e7237
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 10 deletions

View file

@ -11,16 +11,10 @@ const factorNameLabel: Record<MfaFactor, AdminConsoleKey> = {
export type Props = {
type: MfaFactor;
agent?: string;
};
function MfaFactorName({ type, agent }: Props) {
return (
<>
<DynamicT forKey={factorNameLabel[type]} />
{agent && ` - ${agent}`}
</>
);
function MfaFactorName({ type }: Props) {
return <DynamicT forKey={factorNameLabel[type]} />;
}
export default MfaFactorName;

View file

@ -14,13 +14,13 @@ const factorIcon: Record<MfaFactor, SvgComponent> = {
[MfaFactor.BackupCode]: FactorBackupCode,
};
function MfaFactorTitle({ type, agent }: MfaFactorNameProps) {
function MfaFactorTitle({ type }: MfaFactorNameProps) {
const Icon = factorIcon[type];
return (
<div className={styles.factorTitle}>
<Icon className={styles.factorIcon} />
<MfaFactorName type={type} agent={agent} />
<MfaFactorName type={type} />
</div>
);
}