We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b48813 commit 02c4db2Copy full SHA for 02c4db2
pages/[...slug].vue
@@ -1,4 +1,22 @@
1
-<script setup lang="ts"></script>
+<script setup lang="ts">
2
+// definePageMeta({
3
+// pageTransition: defaultPageTransition,
4
+// })
5
+
6
+import type { RoadizNodesSources } from '@roadiz/types'
7
8
+const { item, error } = await useRoadizWebResponse<RoadizNodesSources>()
9
10
+if (error) {
11
+ showError(error)
12
+}
13
14
+const route = useRoute()
15
+// Force redirect when web response URL is not matching current route path
16
+if (item?.url && item.url !== route.path) {
17
+ await navigateTo({ path: item?.url }, { redirectCode: 301 })
18
19
+</script>
20
21
<template>
22
<div>Hello world</div>
0 commit comments