Skip to content

Commit

Permalink
fix(HomePage): use computed for titles
Browse files Browse the repository at this point in the history
fix bug when page titles don't update after user changes language
  • Loading branch information
rudnovd committed Mar 6, 2022
1 parent 3f23a43 commit 53d7e33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</template>

<script lang="ts">
import { defineAsyncComponent, defineComponent } from 'vue'
import { computed, defineAsyncComponent, defineComponent } from 'vue'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
Expand All @@ -49,7 +49,7 @@ export default defineComponent({
const { t } = useI18n()
const router = useRouter()
const pages = [
const pages = computed(() => [
{
name: t('pages.damageCalculator'),
path: '/damage',
Expand All @@ -66,7 +66,7 @@ export default defineComponent({
path: '/creatures',
image: 'Scholar',
},
]
])
return {
t,
Expand Down

0 comments on commit 53d7e33

Please sign in to comment.