mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-01 02:41:39 -05:00
Fixed loader on account profile update
no issue - Loader was missing because of `isRunning` state not added for profile update action
This commit is contained in:
parent
c58fd0c8de
commit
22a1a5a5fd
1 changed files with 1 additions and 6 deletions
|
@ -56,19 +56,14 @@ export default class AccountProfilePage extends React.Component {
|
|||
|
||||
renderSaveButton() {
|
||||
const isRunning = (this.context.action === 'updateProfile:running');
|
||||
const isSaved = (this.context.action === 'updateProfile:success');
|
||||
let label = 'Save';
|
||||
if (isRunning) {
|
||||
label = 'Saving';
|
||||
} else if (isSaved) {
|
||||
label = 'Saved';
|
||||
}
|
||||
if (this.context.action === 'updateProfile:failed') {
|
||||
label = 'Retry';
|
||||
}
|
||||
const disabled = isRunning ? true : false;
|
||||
return (
|
||||
<ActionButton
|
||||
isRunning={isRunning}
|
||||
onClick={e => this.onProfileSave(e)}
|
||||
disabled={disabled}
|
||||
brandColor={this.context.brandColor}
|
||||
|
|
Loading…
Add table
Reference in a new issue