mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-18 06:22:25 +03:00
delete: delete your account error messaging fix
This commit is contained in:
parent
7fad819d13
commit
559f5c3c48
@ -340,9 +340,23 @@ export default class ApplicationPage extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let response = await Actions.deleteViewer();
|
let response = await Actions.deleteViewer();
|
||||||
console.log("DELETE_VIEWER", response);
|
|
||||||
|
if (!response || response.error) {
|
||||||
|
dispatchCustomEvent({
|
||||||
|
name: "create-alert",
|
||||||
|
detail: {
|
||||||
|
alert: {
|
||||||
|
message:
|
||||||
|
"We're having trouble connecting right now. Please try again later",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
await this._handleSignOut();
|
await this._handleSignOut();
|
||||||
|
|
||||||
|
return response;
|
||||||
};
|
};
|
||||||
|
|
||||||
_handleAuthenticate = async (state) => {
|
_handleAuthenticate = async (state) => {
|
||||||
|
@ -182,18 +182,7 @@ export default class SceneEditAccount extends React.Component {
|
|||||||
await delay(100);
|
await delay(100);
|
||||||
|
|
||||||
const response = await this.props.onDeleteYourself();
|
const response = await this.props.onDeleteYourself();
|
||||||
if (!response) {
|
this.setState({ deleting: false });
|
||||||
dispatchCustomEvent({
|
|
||||||
name: "create-alert",
|
|
||||||
detail: {
|
|
||||||
alert: {
|
|
||||||
message:
|
|
||||||
"We're having trouble connecting right now. Please try again later",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
this.setState({ deleting: false });
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_handleChange = (e) => {
|
_handleChange = (e) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user