<template>
    <div class="profile">
        <page-title pagetitle="Profil"/>
        <div>
            <avatar size=250 :src="'avatar/'+this.user.AVATAR" :username="this.user.LOGIN"/>
            <svg-button svg="icons/edit.svg"/>
        </div>
      

  </div>
</template>

<script>
import Avatar from '../components/Avatar.vue';
import PageTitle from '../components/PageTitle.vue'
import SvgButton from '../components/SvgButton.vue';
// @ is an alias to /src


export default {
  name: 'profile',
  components: {
    PageTitle,
    Avatar,
    SvgButton
  },
  methods: {
      getUserInfo: async function(){
      let user = localStorage.getItem('user');
      console.log(user);
      this.user = {"ID_USER":"3","ID_ROLE":"1","LOGIN":"dupontd95","PASWORD":"hasheddupontpwd","AVATAR":"macdougall.jpg","LASTNAME":"dupont","FIRSTNAME":"dupond","MAIL":"dupont.dupond@free.fr","BAN_ACCOUNT":"0","LAST_IP":"92.169.12.3"};
    }

    
  },
  data () {
    return {
      user: {}
    }
  },

  mounted () {
      this.getUserInfo();
  }
}
</script>

<style>

</style>
