<template>
  <div class="p-4">
    <Card :title="t('routes.basic.welcomeUser', [username])" :loading="loading">
      <div class="welcome"> {{ t('routes.basic.welcomeLogin') }} </div>
    </Card>
  </div>
</template>
<script lang="ts">
  import { defineComponent, ref } from 'vue';
  import { useI18n } from '/@/hooks/web/useI18n';
  import { Card } from 'ant-design-vue';
  import { useUserStore } from '/@/store/modules/user';

  export default defineComponent({
    components: { Card },
    setup() {
      const { t } = useI18n();
      const userStore = useUserStore();
      const loading = ref(true);
      const username = ref('');
      username.value = userStore.getUserInfo?.userName;
      setTimeout(() => {
        loading.value = false;
      }, 1000);
      return {
        t,
        loading,
        username,
      };
    },
  });
</script>
<style></style>
