mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-08-28 20:05:12 +02:00
improvement: flow coverage
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import classNames from 'classnames/bind';
|
||||
import { Link } from 'gatsby';
|
||||
import { PAGINATION } from '../../constants';
|
||||
import styles from './Pagination.module.scss';
|
||||
|
||||
type Props = {
|
||||
prevPagePath: string,
|
||||
nextPagePath: string,
|
||||
hasNextPage: boolean,
|
||||
hasPrevPage: boolean
|
||||
};
|
||||
|
||||
const cx = classNames.bind(styles);
|
||||
|
||||
const Pagination = ({
|
||||
@@ -11,7 +19,7 @@ const Pagination = ({
|
||||
nextPagePath,
|
||||
hasNextPage,
|
||||
hasPrevPage
|
||||
}) => {
|
||||
}: Props) => {
|
||||
const prevClassName = cx({
|
||||
'pagination__prev-link': true,
|
||||
'pagination__prev-link--disable': !hasPrevPage
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import Pagination from './Pagination';
|
||||
|
@@ -1 +1,2 @@
|
||||
// @flow
|
||||
export { default } from './Pagination';
|
||||
|
Reference in New Issue
Block a user