Skip to content

Commit

Permalink
improve pro header
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Nov 2, 2023
1 parent ddb2819 commit 425967d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<BranchSelect />

<UNavigationTree :links="mapContentNavigation(navigation)" />
<UNavigationTree :links="mapContentNavigation(navigation)" :multiple="false" default-open />
</template>
</UHeader>
</template>
Expand All @@ -48,9 +48,16 @@ defineProps<{
links: Link[]
}>()
const route = useRoute()
const { metaSymbol } = useShortcuts()
const nav = inject<Ref<NavItem[]>>('navigation')
const navigation = computed(() => nav.value.filter(item => !item._path.startsWith('/pro')))
const navigation = computed(() => {
if (route.path.startsWith('/pro')) {
return nav.value.find(item => item._path === '/pro')?.children
}
return nav.value.filter(item => !item._path.startsWith('/pro'))
})
</script>

0 comments on commit 425967d

Please sign in to comment.