Skip to content

Commit

Permalink
fix: #1121 breadcrumb component not routing (#1169)
Browse files Browse the repository at this point in the history
  • Loading branch information
J0taFerreira authored Feb 8, 2024
1 parent 05a1124 commit f14c878
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
8 changes: 4 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test-coverage": "vitest run --coverage"
},
"dependencies": {
"@bcgov-nr/nr-theme": "^1.8.3",
"@bcgov-nr/nr-theme": "^1.8.4",
"@carbon/icons-vue": "^10.72.1",
"aws-amplify": "^5.3.6",
"axios": "1.6.5",
Expand Down
18 changes: 16 additions & 2 deletions frontend/src/components/common/PageTitle.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { useRoute } from 'vue-router';
import { RouterLink, useRoute } from 'vue-router';
import Breadcrumb from 'primevue/breadcrumb';
import { breadcrumbState } from '@/store/BreadcrumbState';
Expand All @@ -18,7 +18,21 @@ const route = useRoute();
</script>

<template>
<Breadcrumb v-if="route.meta.hasBreadcrumb" :model="breadcrumbState" />
<Breadcrumb
v-if="route.meta.hasBreadcrumb"
:model="breadcrumbState"
>
<template #item="{ item }">
<RouterLink
v-if="item.path"
:to="item.path"
>
<span>
{{ item.label }}
</span>
</RouterLink>
</template>
</Breadcrumb>
<h1 class="title">{{ props.title }}</h1>
<h2 class="subtitle">{{ props.subtitle }}</h2>
</template>
Expand Down

0 comments on commit f14c878

Please sign in to comment.