<commit_before>import React, { PureComponent } from 'react'

export default class ClearAuthPage extends PureComponent {
  clearData() {
    localStorage.clear()
    window.location = 'myblockstackapp://?authCleared=1'
  }

  cancel() {
    window.history.back()
  }

  render() {
    return (
      <div className="container-fluid">
        <h3 className="p-t-20">Sign Out</h3>
        <p>
          <i>
            Erase your keychain and settings so you can create a new one or restore another keychain.
          </i>
        </p>
        <div className="m-t-40">
          <button className="btn btn-danger btn-block" onClick={this.clearData}>
            Confirm
          </button>
        </div>
        <div className="m-t-10">
          <button className="btn btn-tertiary btn-block" onClick={this.cancel}>
            Cancel
          </button>
        </div>
      </div>
    )
  }
}<commit_msg>Take in protocol as a query param<commit_after>import React, { PureComponent } from 'react'
import { withRouter } from 'react-router'

class ClearAuthPage extends PureComponent {
  clearData = () => {
    localStorage.clear()
    window.location = `${this.props.location.query.protocol}://?authCleared=1`
  }

  cancel = () => {
    window.location = `${this.props.location.query.protocol}://?authCleared=0`
  }

  render() {
    return (
      <div className="container-fluid">
        <h3 className="p-t-20">Sign Out</h3>
        <p>
          <i>
            Erase your keychain and settings so you can create a new one or restore another keychain.
          </i>
        </p>
        <div className="m-t-40">
          <button className="btn btn-danger btn-block" onClick={this.clearData}>
            Confirm
          </button>
        </div>
        <div className="m-t-10">
          <button className="btn btn-tertiary btn-block" onClick={this.cancel}>
            Cancel
          </button>
        </div>
      </div>
    )
  }
}

export default withRouter(ClearAuthPage)
{'fraction_non_alphanumeric': 0.13480885311871227, 'fraction_numerical': 0.009557344064386318, 'mean_word_length': 2.1029641185647425, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7217439', 'n_tokens_mistral': 616, 'n_tokens_neox': 591, 'n_words': 142}