Skip to content

Commit

Permalink
fix: normalize prev and next page link
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyuan0704 committed Sep 19, 2022
1 parent 85248c6 commit 8b3f0bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/theme-default/components/DocFooter/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import styles from './index.module.scss';
import { usePageData } from 'island/client';
import { useEditLink, usePrevNextPage } from '../../logic';
import { normalizeHref } from '../../logic/index';

export function DocFooter() {
const { siteData, relativePagePath } = usePageData();
Expand Down Expand Up @@ -36,7 +37,7 @@ export function DocFooter() {
<div className={styles.pager}>
{prevPage ? (
<a
href={prevPage.link}
href={normalizeHref(prevPage.link)}
className={`${styles.pagerLink} ${styles.prev}`}
>
<span className={styles.desc}>Previous Page</span>
Expand All @@ -48,7 +49,7 @@ export function DocFooter() {
{nextPage ? (
<div className={`${styles.hasNext}`}>
<a
href={nextPage.link}
href={normalizeHref(nextPage.link)}
className={`${styles.pagerLink} ${styles.next}`}
>
<span className={styles.desc}>Next Page</span>
Expand Down

0 comments on commit 8b3f0bb

Please sign in to comment.