@fy-/fws-vue 1.7.6 → 1.7.8

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.
Files changed (2) hide show
  1. package/composables/seo.ts +7 -10
  2. package/package.json +1 -1
@@ -1,7 +1,5 @@
1
- // @ts-nocheck
2
1
  import type { Ref } from "vue";
3
- import { useFyHead } from "@fy-/head";
4
- import { computed } from "vue";
2
+ import { useHead } from "@unhead/vue";
5
3
  import { getURL, getLocale, getPrefix } from "@fy-/fws-js";
6
4
  import { useRoute } from "vue-router";
7
5
 
@@ -32,10 +30,9 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
32
30
  const route = useRoute();
33
31
  const currentLocale = seo.value.locale || getLocale();
34
32
 
35
- useFyHead({
36
- title: computed(() => seo.value.title),
37
- scripts: seo.value.scripts,
38
- links: computed(() => {
33
+ useHead({
34
+ title: () => seo.value.title || "",
35
+ link: () => {
39
36
  const links = [];
40
37
 
41
38
  ["prev", "next"].forEach((rel) => {
@@ -70,8 +67,8 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
70
67
  });
71
68
 
72
69
  return links;
73
- }),
74
- metas: computed(() => {
70
+ },
71
+ meta: () => {
75
72
  const metas = [];
76
73
 
77
74
  metas.push(
@@ -141,6 +138,6 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
141
138
  }
142
139
 
143
140
  return metas;
144
- }),
141
+ },
145
142
  });
146
143
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "1.7.6",
3
+ "version": "1.7.8",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {