<commit_before><template>
  <section class="container">
    <h3>Logout</h3>
    <p v-if="!error">Logging you out...</p>
    <p v-else>Error logging out.</p>
  </section>
</template>
<script>
export default {
  name: 'Logout',
  data () {
    return {
      error: false
    }
  },
  beforeRouteEnter (to, from, next) {
    next(vm => vm.logout())
  },
  methods: {
    logout () {
      this.$auth.logout()
      this.redirect()
    },
    redirect () {
      this.$router.replace(this.$route.query.redirect || '/')
    }
  }
}
</script>
<style scoped>
</style><commit_msg>Fix a bug which caused the logout button to stay after logout<commit_after><template>
  <section class="container">
    <h3>Logout</h3>
    <p v-if="!error">Logging you out...</p>
    <p v-else>Error logging out.</p>
  </section>
</template>
<script>
export default {
  name: 'Logout',
  data () {
    return {
      error: false
    }
  },
  beforeRouteEnter (to, from, next) {
    next(vm => vm.logout())
  },
  methods: {
    logout () {
      this.$auth.logout(this.redirect)
    },
    redirect () {
      this.$router.replace(this.$route.query.redirect || '/')
    }
  }
}
</script>
<style scoped>
</style>
{'fraction_non_alphanumeric': 0.1890295358649789, 'fraction_numerical': 0.0033755274261603376, 'mean_word_length': 2.583081570996979, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 33, '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': '217426', 'n_tokens_mistral': 427, 'n_tokens_neox': 428, 'n_words': 87}