<script>

import { mapActions, mapState } from 'pinia'
import { StaticsStore } from '@/stores/statics'

export default {
  props: [],
  data(){
    return {
      // block: null
    }
  },
  computed: {
    ...mapState(StaticsStore,['statics'])
  },
  created () {
    console.log("infos created");
    this.loadStatics()
  },
  methods: {
    ...mapActions(StaticsStore,['loadStatics'])
  },
  components: {
    // LoginBlock,
    // UserTools
  }
}

</script>

<template>
  <ul>
    <li
        v-for="staticnode in statics"
        v-bind:key="staticnode.id"
      >
      <router-link :to="{ name: 'static', params: { id:staticnode.id } }">{{staticnode.title}}</router-link>
    </li>
  </ul>
  
</template>

<style lang="scss" scoped>
  ul{
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
  }
  li{
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    a{
      @include btn();
    }
  }

</style>
