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:
parent
4402141b0e
commit
b5553e7237
2 changed files with 4 additions and 10 deletions
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue