<script setup lang="ts">
import { useCompetenceStore } from "@/stores/competence";
import * as log from "loglevel";
import { onMounted } from "vue";

log.debug("CometencesView created");

const props = defineProps<{
  competenceProfilePageSlug: string;
}>();

const competenceStore = useCompetenceStore();

onMounted(async () => {
  log.debug("CompetencesView mounted", props.competenceProfilePageSlug);

  try {
    await competenceStore.loadCompetenceProfilePage(props.competenceProfilePageSlug);
  } catch (error) {
    log.error(error);
  }
});
</script>

<template>
  <div class="bg-gray-200">
    <main>
      <router-view></router-view>
    </main>
  </div>
</template>

<style scoped></style>
