diff --git a/layouts/default.vue b/layouts/default.vue
index 06b7747c..d53ba92d 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -4,7 +4,9 @@
-
+
+
+
diff --git a/pages/index.vue b/pages/index.vue
index 57c9c519..f7bced1b 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -27,24 +27,11 @@ export default {
end: this.end
})
},
- activated() {
- if (!this.isCurrentMonth) {
- this.start = dayjs().startOf('month').unix()
- this.end = null
- this.$fetch()
- this.isCurrentMonth = true
- return
- }
- if (this.$fetchState.timestamp <= (Date.now() - 60000)) {
- this.$fetch()
- }
- },
data () {
return {
mdiMagnify, mdiCloseCircle,
isCurrentMonth: true,
now: dayjs().unix(),
- // date: dayjs.tz().format('YYYY-MM-DD'),
start: dayjs().startOf('month').unix(),
end: null,
tmpEvents: [],
@@ -130,10 +117,8 @@ export default {
if (month - 1 === dayjs.tz().month() && year === dayjs.tz().year()) {
isCurrentMonth = true
this.start = dayjs().startOf('month').unix()
- // this.date = dayjs.tz().format('YYYY-MM-DD')
} else {
isCurrentMonth = false
- // this.date = ''
this.start = dayjs().year(year).month(month - 1).startOf('month').unix() // .startOf('week').unix()
}
this.end = dayjs().year(year).month(month).endOf('month').unix() // .endOf('week').unix()
diff --git a/store/index.js b/store/index.js
index cd0262bb..a0179aa2 100644
--- a/store/index.js
+++ b/store/index.js
@@ -54,7 +54,9 @@ export const actions = {
// this method is called server side only for each request for nuxt
// we use it to get configuration from db, set locale, etc...
nuxtServerInit ({ commit }, { _req, res }) {
- commit('setSettings', res.locals.settings)
+ if (res.locals && res.locals.settings) {
+ commit('setSettings', res.locals.settings)
+ }
commit('setFilter', { type: 'show_recurrent',
value: res.locals.settings.allow_recurrent_event && res.locals.settings.recurrent_event_visible })