From 8e48bddf5f7c103c2975753c6050cf8ab2a8c291 Mon Sep 17 00:00:00 2001 From: zc Date: Sat, 30 Apr 2022 15:20:08 +0800 Subject: [PATCH] remove extra parentheses showing account numbers (#726) --- web/src/auth/SelfLoginButton.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/auth/SelfLoginButton.js b/web/src/auth/SelfLoginButton.js index f326bfeb..a7b6f9d1 100644 --- a/web/src/auth/SelfLoginButton.js +++ b/web/src/auth/SelfLoginButton.js @@ -23,6 +23,14 @@ class SelfLoginButton extends React.Component { }; } + getAccountShowName() { + let {name, displayName} = this.props.account; + if (displayName !== '') { + name += ' (' + displayName + ')'; + } + return name; + } + render() { const config = { icon: this.generateIcon(), @@ -32,7 +40,7 @@ class SelfLoginButton extends React.Component { }; const SelfLoginButton = createButton(config); - return this.props.onClick()} align={"center"} /> + return this.props.onClick()} align={"center"}/> } }