<template>
  <div>
    <br />
    <Alert :text="message" :type="type" />
    <div class="row">
      <div class="offset-3 col-md-2">
        <button type="button" class="form-control btn btn-primary" @click="goBack()">Back</button>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex';
import Alert from './alert.vue';

export default {
  components: {
    Alert,
  },
  computed: {
    ...mapState('alert', ['message', 'type']),
  },
  methods: {
    goBack() {
      this.$router.go(-1);
    },
  },
};
</script>
