<template>
  <ContentBase>
      <div>
          {{ $store.state.user.username }}
      </div>
  </ContentBase> 
</template>

<script>
import ContentBase from  '../components/ContentBase';
import { useStore } from 'vuex';
import router from '../router/index.js';

export default {
  name: 'UserProfileView',
  components: {
    ContentBase,
  },
  setup(){
      let store = useStore();
      if (!store.state.user.is_login){
        router.push({name:'login'});
      }
      return {
          store,
      }
  }
}
</script>

<style scoped>
</style>

