<script setup lang="ts">
import Background from "./Background.vue";
import Buttons from "./Buttons.vue";

const store = useProjectsStore();

onMounted(async () => {
  store.$reset();
  await store.loadProjects();
});

watch(
  () => store.loading,
  () => {
    if (!store.loading) {
      store.animateIntro();
    }
  },
);
</script>

<template>
  <template v-if="!store.loading">
    <Background />
    <Buttons />
  </template>
</template>
