mirror of
https://github.com/sergeyyarkov/devthread.ru.git
synced 2026-10-11 02:09:04 +03:00
prop types
This commit is contained in:
parent
ffcb871bde
commit
96f29a1a74
@ -44,10 +44,4 @@ About.propTypes = {
|
||||
title: PropTypes.string,
|
||||
pageTitle: PropTypes.string,
|
||||
email: PropTypes.string
|
||||
}
|
||||
|
||||
About.defaultProps = {
|
||||
title: null,
|
||||
pageTitle: null,
|
||||
email: null
|
||||
}
|
||||
@ -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
|
||||
export default Categories
|
||||
|
||||
Categories.propTypes = {
|
||||
setQuery: PropTypes.func
|
||||
}
|
||||
@ -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
|
||||
}
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
export default ViewCounter;
|
||||
|
||||
ViewCounter.propTypes = {
|
||||
id: PropTypes.string
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user