Skip to content

Commit

Permalink
fix: fix next and prev links not working when the base option is set (
Browse files Browse the repository at this point in the history
  • Loading branch information
ElMassimo committed Nov 20, 2020
1 parent ac5fbec commit 018a9b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/client/theme-default/components/NextAndPrevLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<div v-if="hasLinks" class="next-and-prev-link">
<div class="container">
<div class="prev">
<a v-if="prev" class="link" :href="prev.link">
<a v-if="prev" class="link" :href="withBase(prev.link)">
<ArrowLeft class="icon icon-prev" />
<span class="text">{{ prev.text }}</span>
</a>
</div>
<div class="next">
<a v-if="next" class="link" :href="next.link">
<a v-if="next" class="link" :href="withBase(next.link)">
<span class="text">{{ next.text }}</span>
<ArrowRight class="icon icon-next" />
</a>
Expand All @@ -20,6 +20,7 @@
<script lang="ts">
import { defineComponent } from 'vue'
import { useNextAndPrevLinks } from '../composables/nextAndPrevLinks'
import { withBase } from '../utils'
import ArrowLeft from './icons/ArrowLeft.vue'
import ArrowRight from './icons/ArrowRight.vue'
Expand All @@ -35,7 +36,8 @@ export default defineComponent({
return {
hasLinks,
prev,
next
next,
withBase,
}
}
})
Expand Down

0 comments on commit 018a9b4

Please sign in to comment.