Remove function call and closure
parent
ab6f029ea0
commit
c4c6ad6974
|
@ -38,7 +38,7 @@ class OrganizationsTableRow extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleChangeCurrentOrganization = () => async () => {
|
handleChangeCurrentOrganization = async () => {
|
||||||
const {router, links, meChangeOrganization, organization} = this.props
|
const {router, links, meChangeOrganization, organization} = this.props
|
||||||
|
|
||||||
await meChangeOrganization(links.me, {organization: organization.id})
|
await meChangeOrganization(links.me, {organization: organization.id})
|
||||||
|
@ -138,7 +138,7 @@ class OrganizationsTableRow extends Component {
|
||||||
</button>
|
</button>
|
||||||
: <button
|
: <button
|
||||||
className="btn btn-sm btn-default"
|
className="btn btn-sm btn-default"
|
||||||
onClick={this.handleChangeCurrentOrganization()}
|
onClick={this.handleChangeCurrentOrganization}
|
||||||
>
|
>
|
||||||
<span className="icon shuffle" /> Switch to
|
<span className="icon shuffle" /> Switch to
|
||||||
</button>}
|
</button>}
|
||||||
|
|
Loading…
Reference in New Issue