mirror of https://github.com/vector-im/riot-web
allow logout dialog to be cancelled (can't see why not?)
parent
fc57109c54
commit
a31dacc4bc
|
@ -39,14 +39,15 @@ export default (props) => {
|
||||||
const onFinished = (confirmed) => {
|
const onFinished = (confirmed) => {
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
dis.dispatch({action: 'logout'});
|
dis.dispatch({action: 'logout'});
|
||||||
if (props.onFinished) {
|
}
|
||||||
props.onFinished();
|
// close dialog
|
||||||
}
|
if (props.onFinished) {
|
||||||
|
props.onFinished();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (<QuestionDialog
|
return (<QuestionDialog
|
||||||
hasCancelButton={false}
|
hasCancelButton={true}
|
||||||
title={_t("Sign out")}
|
title={_t("Sign out")}
|
||||||
description={<div>{description}</div>}
|
description={<div>{description}</div>}
|
||||||
button={_t("Sign out")}
|
button={_t("Sign out")}
|
||||||
|
|
Loading…
Reference in New Issue