Make OAuthWidget work for prompt page.

This commit is contained in:
Yang Luo
2021-06-20 02:02:08 +08:00
parent 0f69f4f07c
commit e0b6270f50
3 changed files with 88 additions and 15 deletions

View File

@@ -249,7 +249,9 @@ class UserEditPage extends React.Component {
<Col span={22} >
<div style={{marginBottom: 20}}>
{
this.state.application?.providers.filter(providerItem => Setting.isProviderVisible(providerItem)).map((providerItem, index) => <OAuthWidget user={this.state.user} application={this.state.application} providerItem={providerItem} onUnlinked={() => { return this.unlinked()}} />)
(this.state.application === null || this.state.user === null) ? null : (
this.state.application?.providers.filter(providerItem => Setting.isProviderVisible(providerItem)).map((providerItem, index) => <OAuthWidget key={providerItem.name} labelSpan={3} user={this.state.user} application={this.state.application} providerItem={providerItem} onUnlinked={() => { return this.unlinked()}} />)
)
}
</div>
</Col>