OtherNodes.vue 625 Bytes
Newer Older
Adam Procter's avatar
Adam Procter committed
1
<template>
2
3
4
5
  <div v-for="(nodes, index) in otherNodes.otherNodes" :key="index">
    <p class="readmode" :id="nodes.id">
      {{ nodes.text }}
    </p>
Adam Procter's avatar
Adam Procter committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  </div>
</template>

<script>
// @ is an alias to /src
import { mapState } from 'vuex'

// import marked from 'marked'

export default {
  name: 'OtherNodes',

  computed: {
    ...mapState({
      otherNodes: (state) => state.otherNodes,
    }),
  },

  mounted() {
25
    this.$store.dispatch('getOthernodes')
Adam Procter's avatar
Adam Procter committed
26
27
28
29
30
    setTimeout(this.loadData, 500)
  },

  methods: {
    loadData() {
31
      this.$store.dispatch('setOthernodes')
Adam Procter's avatar
Adam Procter committed
32
33
34
35
36
37
    },
  },
}
</script>

<style scoped></style>