<template>
  <div class="flex flex-col h-full w-full overflow-y-auto">
    <p>{{ activeMemberObj }}</p>
    <Spinner v-if="loadingActive == 'loading'" class="mx-auto" />
    <p v-else-if="loadingActive == 'failed'">laden fehlgeschlagen</p>
  </div>
</template>

<script setup lang="ts">
import { defineComponent } from "vue";
import { mapActions, mapState } from "pinia";
import Spinner from "@/components/Spinner.vue";
import { useMemberStore } from "@/stores/admin/member";
</script>

<script lang="ts">
export default defineComponent({
  computed: {
    ...mapState(useMemberStore, ["activeMemberObj", "loadingActive"]),
  },
  mounted() {
    this.fetchMemberByActiveId();
  },
  methods: {
    ...mapActions(useMemberStore, ["fetchMemberByActiveId"]),
  },
});
</script>
