diff --git a/src/components/Layout/LayoutFooter.vue b/src/components/Layout/LayoutFooter.vue index 3fd1ce3..031f92c 100644 --- a/src/components/Layout/LayoutFooter.vue +++ b/src/components/Layout/LayoutFooter.vue @@ -5,7 +5,10 @@
{{ project_authors }} - + {{ project_citation }}. Retrieved on {{ currentDate }} diff --git a/src/modules/otus/views/Index.vue b/src/modules/otus/views/Index.vue index 59e549c..5849162 100644 --- a/src/modules/otus/views/Index.vue +++ b/src/modules/otus/views/Index.vue @@ -84,6 +84,7 @@ import { } from 'vue' import { useRoute, useRouter } from 'vue-router' import { useOtuStore } from '../store/store' +import { useFooterStore } from '@/store' import { useHead } from 'unhead' import { useSchemaOrg, defineTaxon } from '@/plugins/schemaOrg/composables' import { RESPONSE_ERROR } from '../constants' @@ -99,6 +100,7 @@ const router = useRouter() const routeParams = ref(route.params) const childrenRoutes = useChildrenRoutes() const store = useOtuStore() +const footerStore = useFooterStore() let controller = new AbortController() router.afterEach((route) => { @@ -137,10 +139,12 @@ onMounted(async () => { onBeforeUnmount(() => { store.$reset() + footerStore.$reset() }) async function loadInitialData() { store.$reset() + footerStore.$reset() try { await store.loadInit({ diff --git a/src/store/useFooterStore.js b/src/store/useFooterStore.js index 32beee3..eda16b2 100644 --- a/src/store/useFooterStore.js +++ b/src/store/useFooterStore.js @@ -1,13 +1,12 @@ import { defineStore } from 'pinia' export const useFooterStore = defineStore('footerStore', { - state: () => { - return { - nextAuthor: '' - } - }, + state: () => ({ + nextAuthor: '' + }), + actions: { - setNextAuthorText(value) { + async setNextAuthorText(value) { this.nextAuthor = value } }