message: Factor out clearStorageButton
diff: @@ -58,6 +58,12 @@ export default React.createClass({
  const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
  const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
  + const clearStorageButton = (
  + <button onClick={this._onClearStorageClick} className="danger">
  + { _t("Clear Storage and Sign Out") }
  + </button>
  + );
  +
  let dialogButtons;
  if (SdkConfig.get().bug_report_endpoint_url) {
  dialogButtons = <DialogButtons primaryButton={_t("Send Logs")}
  @@ -65,9 +71,7 @@ export default React.createClass({
  focus={true}
  hasCancel={false}
  >
  - <button onClick={this._onClearStorageClick} className="danger">
  - { _t("Clear Storage and Sign Out") }
  - </button>
  + {clearStorageButton}
  </DialogButtons>;
  } else {
  dialogButtons = <DialogButtons primaryButton={_t("Refresh")}
  @@ -75,9 +79,7 @@ export default React.createClass({
  focus={true}
  hasCancel={false}
  >
  - <button onClick={this._onClearStorageClick} className="danger">
  - { _t("Clear Storage and Sign Out") }
  - </button>
  + {clearStorageButton}
  </DialogButtons>;
  }
  