aboutsummaryrefslogtreecommitdiff
path: root/src/components/lists/lists.js
blob: 791b99b28fbbfb32222c554bc78066d4eca47af7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import ListsCard from '../lists_card/lists_card.vue'
import ListsNew from '../lists_new/lists_new.vue'

const Lists = {
  data () {
    return {
      isNew: false
    }
  },
  components: {
    ListsCard,
    ListsNew
  },
  created () {
    this.$store.dispatch('startFetchingLists')
  },
  computed: {
    lists () {
      return this.$store.state.lists.allLists
    }
  },
  methods: {
    cancelNewList () {
      this.isNew = false
    },
    newList () {
      this.isNew = true
    }
  }
}

export default Lists