allow logout dialog to be cancelled (can't see why not?)

pull/21833/head
Bruno Windels 2018-12-11 12:43:56 +01:00
parent fc57109c54
commit a31dacc4bc
1 changed files with 5 additions and 4 deletions

View File

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