24 lines
519 B
JavaScript
24 lines
519 B
JavaScript
import React from 'react'
|
|
import { Link } from 'gatsby'
|
|
|
|
const Pagination = ({ pageContext, pathPrefix }) => {
|
|
const { previousPagePath, nextPagePath } = pageContext
|
|
|
|
return (
|
|
<nav className="pagination" role="navigation">
|
|
{previousPagePath && (
|
|
<Link to={previousPagePath} rel="prev">
|
|
← Forrige
|
|
</Link>
|
|
)}
|
|
{nextPagePath && (
|
|
<Link to={nextPagePath} rel="next">
|
|
Neste →
|
|
</Link>
|
|
)}
|
|
</nav>
|
|
)
|
|
}
|
|
|
|
export default Pagination
|