<template>
  <div class="container">
    <h1 class="mb-4">Member Area</h1>
    <ul class="list-disc">
      <li>Username: {{ userData.username }}</li>
      <li>Name: {{ userData.name }}</li>
      <li>Is sso: {{ userData.is_sso }}</li>
      <li>Created at: {{ userData.created_at }}</li>
    </ul>
  </div>
</template>

<script>
import { storeToRefs } from 'pinia';
import loginStore from '@/stores/login.js';

export default {
  setup() {
    const store = loginStore();
    const { userData } = storeToRefs(store);
    const { getUserData } = store;

    return {
      userData,
      getUserData,
    }
  },
  methods: {
  },
  mounted() {
    this.getUserData();
  }
};

</script>
