Skip to content

Commit

Permalink
Update Navigation based on Locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Mocca101 committed Aug 7, 2023
1 parent d9a38b4 commit d728cec
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions components/HeaderBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</nuxt-link>
<v-spacer />

<ContentNavigation v-slot="{ navigation }" :query="navLocaleQuery">
<template v-if="navigation !== null">
<template v-for="el of navigation">
<NuxtLink
v-if="!el.children"
Expand All @@ -23,14 +23,13 @@
v-for="link of el.children"
:key="link._path"
:to="link._path"
class="text-decoration-none font-weight-bold"
>
<p class="text-decoration-none font-weight-medium">
{{ link.navTitle || link.title }}
</p>
{{ link.navTitle || link.title }}
</NuxtLink>
</template>
</template>
</ContentNavigation>
</template>

<client-only>
<v-tooltip content-class="text-capitalize" :text="$t('global.basics.map')" location="bottom">
Expand Down Expand Up @@ -118,8 +117,12 @@ const navLocaleQuery = computed(() : QueryBuilderParams => {
]
};
});
// const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation(navLocaleQuery.value))
const { data: navigation } = await useAsyncData(
'navigation',
() => fetchContentNavigation(navLocaleQuery.value),
{
watch: [navLocaleQuery]
});
const selectedLocaleLocalStorageKey = 'oad-selected-locale';
Expand Down

0 comments on commit d728cec

Please sign in to comment.