improvement: flow coverage

This commit is contained in:
alxshelepenok
2019-05-10 02:15:43 +03:00
parent 091834f16a
commit 35f2170bf5
66 changed files with 308 additions and 56 deletions

View File

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

View File

@@ -1,3 +1,4 @@
// @flow
import React from 'react';
import renderer from 'react-test-renderer';
import Pagination from './Pagination';

View File

@@ -1 +1,2 @@
// @flow
export { default } from './Pagination';