55 >
66 <UButton
77 v-if =" previous"
8- :to =" previous._path "
8+ :to =" previous.path "
99 class =" group gap-4"
1010 size =" lg"
1111 icon =" i-heroicons-arrow-left"
2020 </UButton >
2121 <UButton
2222 v-if =" next"
23- :to =" next._path "
23+ :to =" next.path "
2424 class =" ml-auto group gap-4"
2525 size =" lg"
2626 icon =" i-heroicons-arrow-right"
@@ -44,11 +44,9 @@ const props = defineProps({
4444
4545const { version , isLatestVersion } = useDocsMetadata ();
4646
47- const parts = props .current ._path .split (" /" ).slice (1 );
48-
4947const { data } = await useAsyncData (
50- " doc /" + props .current ._path + " /pagination" ,
51- () => queryContent (parts[ 0 ], parts[ 1 ]). findSurround ( props .current ._path )
48+ " docs /" + props .current .path + " /pagination" ,
49+ () => queryCollectionItemSurroundings ( " docs " , props .current .path )
5250);
5351
5452const previous = computed (() => data .value [0 ]);
@@ -57,22 +55,19 @@ const next = computed(() => data.value[1]);
5755// the latest version doesn't have the version in the url
5856if (isLatestVersion .value ) {
5957 if (previous .value ) {
60- previous .value ._path = removeDocsVersionFromPath (
61- previous .value ._path ,
58+ previous .value .path = removeDocsVersionFromPath (
59+ previous .value .path ,
6260 version .value
6361 );
6462 }
6563
6664 if (next .value ) {
67- next .value ._path = removeDocsVersionFromPath (
68- next .value ._path ,
69- version .value
70- );
65+ next .value .path = removeDocsVersionFromPath (next .value .path , version .value );
7166 }
7267}
7368
7469function formatModName (document ) {
75- const modID = document ._path .split (" /" )[isLatestVersion .value ? 2 : 3 ];
70+ const modID = document .path .split (" /" )[isLatestVersion .value ? 2 : 3 ];
7671 const mod = getMod (modID);
7772 return mod ? mod .name : modID;
7873}
0 commit comments