diff --git a/src/components/About/About.js b/src/components/About/About.js index 2a57779..8d0e57e 100644 --- a/src/components/About/About.js +++ b/src/components/About/About.js @@ -44,10 +44,4 @@ About.propTypes = { title: PropTypes.string, pageTitle: PropTypes.string, email: PropTypes.string -} - -About.defaultProps = { - title: null, - pageTitle: null, - email: null } \ No newline at end of file diff --git a/src/components/Articles/Categories/Categories.js b/src/components/Articles/Categories/Categories.js index 0968a8a..eeb0446 100644 --- a/src/components/Articles/Categories/Categories.js +++ b/src/components/Articles/Categories/Categories.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types' import { useLocation } from '@reach/router' import { Link } from 'gatsby' @@ -18,4 +19,8 @@ const Categories = ({ children, setQuery = () => null }) => { ) } -export default Categories \ No newline at end of file +export default Categories + +Categories.propTypes = { + setQuery: PropTypes.func +} \ No newline at end of file diff --git a/src/components/Articles/Search/Search.js b/src/components/Articles/Search/Search.js index 921fc04..40f4b8c 100644 --- a/src/components/Articles/Search/Search.js +++ b/src/components/Articles/Search/Search.js @@ -28,5 +28,13 @@ const Search = ({ allArticles, filterArticles, articlesLength, resultsLength, qu export default Search Search.propTypes = { - articlesLength: PropTypes.number + allArticles: PropTypes.array, + filterArticles: PropTypes.func, + articlesLength: PropTypes.number, + resultsLength: PropTypes.number, + query: PropTypes.string, + setQuery: PropTypes.func, + setFiltredArticles: PropTypes.func, + setLimit: PropTypes.func, + onPage: PropTypes.number } \ No newline at end of file diff --git a/src/components/SEO/SEO.js b/src/components/SEO/SEO.js index bce35cc..9598530 100644 --- a/src/components/SEO/SEO.js +++ b/src/components/SEO/SEO.js @@ -70,11 +70,11 @@ export default SEO SEO.propTypes = { title: PropTypes.string, - description: PropTypes.string -} - -SEO.defaultProps = { - title: null, - description: null + titleTemplate: PropTypes.bool, + keywords: PropTypes.string, + description: PropTypes.string, + image: PropTypes.string, + type: PropTypes.string, + canonical: PropTypes.string } diff --git a/src/components/ViewCounter/ViewCounter.js b/src/components/ViewCounter/ViewCounter.js index 1104f6a..6405cd3 100644 --- a/src/components/ViewCounter/ViewCounter.js +++ b/src/components/ViewCounter/ViewCounter.js @@ -1,4 +1,5 @@ import React, { useEffect, useState } from 'react'; +import PropTypes from 'prop-types' import firebase from 'gatsby-plugin-firebase'; import incrementViews from '../../lib/increment-views'; @@ -28,4 +29,8 @@ const ViewCounter = ({ id }) => { ); }; -export default ViewCounter; \ No newline at end of file +export default ViewCounter; + +ViewCounter.propTypes = { + id: PropTypes.string +} \ No newline at end of file