enhanced print view

This commit is contained in:
2022-09-17 20:02:58 +02:00
parent 3c010efb59
commit 63d010d04a
28 changed files with 2169 additions and 1979 deletions

View File

@@ -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>