@fy-/fws-vue 2.1.21 → 2.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,13 +32,14 @@ function getBreadcrumbID() {
32
32
  const chain = props.nav.map(item => item.name).join(' > ')
33
33
  return stringHash(chain)
34
34
  }
35
-
36
- useSchemaOrg([
37
- defineBreadcrumb({
38
- '@id': `#${getBreadcrumbID()}`,
39
- 'itemListElement': breadcrumbsSchemaFormat,
40
- }),
41
- ])
35
+ if (props.nav && props.nav.length) {
36
+ useSchemaOrg([
37
+ defineBreadcrumb({
38
+ '@id': `#${getBreadcrumbID()}`,
39
+ 'itemListElement': breadcrumbsSchemaFormat,
40
+ }),
41
+ ])
42
+ }
42
43
  </script>
43
44
 
44
45
  <template>
@@ -6,9 +6,8 @@ import type { RouteLocationRaw } from 'vue-router'
6
6
  import type { APIPaging } from '../../composables/rest'
7
7
  import { getURL, hasFW } from '@fy-/fws-js'
8
8
  import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/vue/24/solid'
9
- import { useHead } from '@unhead/vue'
9
+ import { useServerHead } from '@unhead/vue'
10
10
  import {
11
- computed,
12
11
  onMounted,
13
12
  onUnmounted,
14
13
  ref,
@@ -110,26 +109,24 @@ onUnmounted(() => {
110
109
  })
111
110
 
112
111
  checkPageNumber(props.items.page_no)
113
- useHead({
114
- link: computed(() => {
115
- const result: any = []
116
- if (prevNextSeo.value.next) {
117
- result.push({
118
- href: prevNextSeo.value.next,
119
- rel: 'next',
120
- key: 'next',
121
- })
122
- }
123
- if (prevNextSeo.value.prev) {
124
- result.push({
125
- href: prevNextSeo.value.prev,
126
- rel: 'prev',
127
- key: 'prev',
128
- })
129
- }
112
+ const result: any = []
113
+ if (prevNextSeo.value.next) {
114
+ result.push({
115
+ href: prevNextSeo.value.next,
116
+ rel: 'next',
117
+ key: 'next',
118
+ })
119
+ }
120
+ if (prevNextSeo.value.prev) {
121
+ result.push({
122
+ href: prevNextSeo.value.prev,
123
+ rel: 'prev',
124
+ key: 'prev',
125
+ })
126
+ }
130
127
 
131
- return result
132
- }),
128
+ useServerHead({
129
+ link: result,
133
130
  })
134
131
  </script>
135
132
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.1.21",
3
+ "version": "2.1.23",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",