Skip to content

Commit

Permalink
fix: footer nav
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Aug 12, 2024
1 parent 57b0515 commit ed6b3fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/[...slug]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default async function Layout({ params, children }: Props) {

const asPath = slug.join('/')

const currentPageIndex = docs.findIndex((item) => item.url === asPath)
const currentPageIndex = docs.findIndex(({ url }) => url === `/${asPath}`)
const currentPage = docs[currentPageIndex]
const previousPage = currentPageIndex > 0 && docs[currentPageIndex - 1]
const nextPage = currentPageIndex < docs.length - 1 && docs[currentPageIndex + 1]
Expand Down

0 comments on commit ed6b3fe

Please sign in to comment.