mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-09-13 03:30:50 +02:00
enhanced print view
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
import React from "react";
|
||||
|
||||
import { PAGINATION } from "@/constants";
|
||||
import classNames from "classnames";
|
||||
import { Link } from "gatsby";
|
||||
|
||||
import React from "react";
|
||||
import * as styles from "./Pagination.module.scss";
|
||||
import { PAGINATION } from "@/constants";
|
||||
|
||||
|
||||
type Props = {
|
||||
prevPagePath: string;
|
||||
@@ -14,12 +11,7 @@ type Props = {
|
||||
hasPrevPage: boolean;
|
||||
};
|
||||
|
||||
const Pagination = ({
|
||||
prevPagePath,
|
||||
nextPagePath,
|
||||
hasNextPage,
|
||||
hasPrevPage,
|
||||
}: Props) => {
|
||||
const Pagination = ({ prevPagePath, nextPagePath, hasNextPage, hasPrevPage }: Props) => {
|
||||
const prevClassName = classNames(styles.previousLink, {
|
||||
[styles.disable]: !hasPrevPage,
|
||||
});
|
||||
@@ -29,12 +21,12 @@ const Pagination = ({
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={styles.pagination}>
|
||||
<div className={`${styles.pagination}`}>
|
||||
<div className={styles.previous}>
|
||||
<Link
|
||||
rel="prev"
|
||||
to={hasPrevPage ? prevPagePath : "/"}
|
||||
className={prevClassName}
|
||||
className={`${prevClassName} hideInPrintView`}
|
||||
>
|
||||
{PAGINATION.PREV_PAGE}
|
||||
</Link>
|
||||
@@ -43,7 +35,7 @@ const Pagination = ({
|
||||
<Link
|
||||
rel="next"
|
||||
to={hasNextPage ? nextPagePath : "/"}
|
||||
className={nextClassName}
|
||||
className={`${nextClassName} hideInPrintView`}
|
||||
>
|
||||
{PAGINATION.NEXT_PAGE}
|
||||
</Link>
|
||||
|
Reference in New Issue
Block a user