0
Fork 0
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:
Rish 2020-10-02 18:00:29 +05:30
parent c58fd0c8de
commit 22a1a5a5fd

View file

@ -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}