mirror of
https://github.com/sergeyyarkov/devthread.ru.git
synced 2026-10-11 10:19:13 +03:00
prop types
This commit is contained in:
parent
ffcb871bde
commit
96f29a1a74
@ -44,10 +44,4 @@ About.propTypes = {
|
|||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
pageTitle: PropTypes.string,
|
pageTitle: PropTypes.string,
|
||||||
email: PropTypes.string
|
email: PropTypes.string
|
||||||
}
|
|
||||||
|
|
||||||
About.defaultProps = {
|
|
||||||
title: null,
|
|
||||||
pageTitle: null,
|
|
||||||
email: null
|
|
||||||
}
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
import { useLocation } from '@reach/router'
|
import { useLocation } from '@reach/router'
|
||||||
import { Link } from 'gatsby'
|
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
|
export default Search
|
||||||
|
|
||||||
Search.propTypes = {
|
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 = {
|
SEO.propTypes = {
|
||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
description: PropTypes.string
|
titleTemplate: PropTypes.bool,
|
||||||
}
|
keywords: PropTypes.string,
|
||||||
|
description: PropTypes.string,
|
||||||
SEO.defaultProps = {
|
image: PropTypes.string,
|
||||||
title: null,
|
type: PropTypes.string,
|
||||||
description: null
|
canonical: PropTypes.string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
import firebase from 'gatsby-plugin-firebase';
|
import firebase from 'gatsby-plugin-firebase';
|
||||||
import incrementViews from '../../lib/increment-views';
|
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