2019-04-03 00:25:12 +02:00
|
|
|
<template lang="pug">
|
2019-05-30 12:04:14 +02:00
|
|
|
#home
|
|
|
|
Nav
|
|
|
|
Home
|
2019-06-06 23:54:32 +02:00
|
|
|
|
2019-04-03 00:25:12 +02:00
|
|
|
</template>
|
2019-05-30 12:04:14 +02:00
|
|
|
<script>
|
|
|
|
import Home from '~/components/Home.vue'
|
|
|
|
import Nav from '~/components/Nav.vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'Index',
|
2019-06-06 23:54:32 +02:00
|
|
|
async fetch ({ store, $axios }) {
|
2019-06-07 17:02:33 +02:00
|
|
|
try {
|
|
|
|
const now = new Date()
|
|
|
|
const events = await $axios.$get(`/event/${now.getMonth()}/${now.getFullYear()}`)
|
|
|
|
store.commit('setEvents', events)
|
|
|
|
const { tags, places } = await $axios.$get('/event/meta')
|
|
|
|
store.commit('update', { tags, places })
|
2019-09-11 19:12:24 +02:00
|
|
|
} catch (e) {
|
2019-06-07 17:02:33 +02:00
|
|
|
console.error(e)
|
|
|
|
}
|
2019-06-06 23:54:32 +02:00
|
|
|
},
|
2019-09-11 19:12:24 +02:00
|
|
|
components: { Nav, Home }
|
2019-05-30 12:04:14 +02:00
|
|
|
}
|
|
|
|
</script>
|