fix: the link button with disabled style but can click (#1390)

This commit is contained in:
Yaodong Yu
2022-12-10 22:14:20 +08:00
committed by GitHub
parent 19dce838d1
commit e3c36beaf4
4 changed files with 49 additions and 35 deletions

View File

@ -164,7 +164,7 @@ class OAuthWidget extends React.Component {
</span>
{
linkedValue === "" ? (
<a key={provider.displayName} href={Provider.getAuthUrl(application, provider, "link")}>
<a key={provider.displayName} href={user.id !== account.id ? null : Provider.getAuthUrl(application, provider, "link")}>
<Button style={{marginLeft: "20px", width: "80px"}} type="primary" disabled={user.id !== account.id}>{i18next.t("user:Link")}</Button>
</a>
) : (