<template>
  <div class="body">
    <Navbar/>
    <div class="container d-flex justify-content-center">
      <div class="card shadow mb-4">
        <h5 class="card-header text-primary">Vos informations</h5>
        <div class="card-body" style="width : 500px;">

        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import Navbar from '@/components/Navbar'

  export default {
    name: 'GameChoice',
    components: {
      Navbar
    },
    beforeMount() {
      this.getData()
    },
    methods: {
      getData() {
        fetch(this.$apiUrl + '/validatetoken', {
          method: 'GET',
          headers: {
            'Authorization' : 'Bearer ' + localStorage.token
          }
        })
          .then(response => {
            if (response.status === 200) {
              console.log(response.json())
            } 
            // else {
            //   window.location.href = '/#/'
            // }
          })
          // .then(tokenData => {
          //   console.log(tokenData)
          // })
      }
    }
  }
</script>