diff --git a/src/components/Article/Article.js b/src/components/Article/Article.js index 34b937f..744bbc1 100644 --- a/src/components/Article/Article.js +++ b/src/components/Article/Article.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types' import SEO from '../SEO/SEO' import Img from "gatsby-image" import slugify from '../../helpers/slugify' @@ -84,4 +85,18 @@ const Article = ({ data: { slug, title, image, description, category, tags, time ) } -export default Article \ No newline at end of file +export default Article + +Article.propTypes = { + data: PropTypes.shape({ + slug: PropTypes.string, + title: PropTypes.string, + image: PropTypes.object, + description: PropTypes.string, + category: PropTypes.string, + tags: PropTypes.array, + time: PropTypes.string, + date: PropTypes.string + }), + html: PropTypes.string +} \ No newline at end of file diff --git a/src/components/Articles/ArticleCard/ArticleCard.js b/src/components/Articles/ArticleCard/ArticleCard.js index e16e9dc..109341f 100644 --- a/src/components/Articles/ArticleCard/ArticleCard.js +++ b/src/components/Articles/ArticleCard/ArticleCard.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types' import slugify from '../../../helpers/slugify' import Img from "gatsby-image" import { Link } from 'gatsby' @@ -32,4 +33,15 @@ const ArticleCard = ({ data: { slug, title, image, category, description, tags } ) } -export default ArticleCard \ No newline at end of file +export default ArticleCard + +ArticleCard.propTypes = { + data: PropTypes.shape({ + slug: PropTypes.string, + title: PropTypes.string, + image: PropTypes.object, + category: PropTypes.string, + description: PropTypes.string, + tags: PropTypes.array + }) +} \ No newline at end of file diff --git a/src/components/Articles/Articles.js b/src/components/Articles/Articles.js index 593c484..fc33370 100644 --- a/src/components/Articles/Articles.js +++ b/src/components/Articles/Articles.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types' import ArticleCard from './ArticleCard/ArticleCard' import './Articles.scss' @@ -12,4 +13,10 @@ const Articles = ({ data: { edges } }) => { ) } -export default Articles \ No newline at end of file +export default Articles + +Articles.propTypes = { + data: PropTypes.shape({ + edges: PropTypes.array + }) +} \ No newline at end of file diff --git a/src/components/Footer/Footer.js b/src/components/Footer/Footer.js index 8b6947b..2416ccc 100644 --- a/src/components/Footer/Footer.js +++ b/src/components/Footer/Footer.js @@ -1,4 +1,5 @@ import React from 'react'; +import { Link } from 'gatsby' import PropTypes from 'prop-types' import './Footer.scss' @@ -19,25 +20,25 @@ const Footer = ({ title }) => {

Навигация

Контакты

Социальные сети

diff --git a/src/components/Offers/Offers.js b/src/components/Offers/Offers.js index ef4b642..42dffeb 100644 --- a/src/components/Offers/Offers.js +++ b/src/components/Offers/Offers.js @@ -3,8 +3,10 @@ import usePopularArticlesQuery from '../../hooks/usePopularArticlesQuery' import useTagsQuery from '../../hooks/useTagsQuery' import './Offers.scss' import Popular from './Popular/Popular' -import PopularItem from './Popular/PopularItem' import Tags from './Tags/Tags' +import Subscription from './Subscription/Subscription' + +import PopularItem from './Popular/PopularItem' import TagItem from './Tags/TagItem' import BooksIcon from '../../images/books-icon.svg' @@ -32,17 +34,7 @@ const Offers = () => { )} -
-
- Читайте нас в Telegram -
-
-

- В нашем канале telegram вы не пропустите новые статьи, присоединяйтесь к другим разработчикам -

- Подписаться -
-
+ ) } diff --git a/src/components/Offers/Popular/PopularItem.js b/src/components/Offers/Popular/PopularItem.js index 60db7cb..6d2ad9e 100644 --- a/src/components/Offers/Popular/PopularItem.js +++ b/src/components/Offers/Popular/PopularItem.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types' import { Link } from 'gatsby' import ViewsIcon from '../../../images/views-icon.svg' @@ -17,4 +18,9 @@ const PopularItem = ({ slug, title }) => { ) } -export default PopularItem \ No newline at end of file +export default PopularItem + +PopularItem.propTypes = { + slug: PropTypes.string, + title: PropTypes.string +} \ No newline at end of file diff --git a/src/components/Offers/Subscription/Subscription.js b/src/components/Offers/Subscription/Subscription.js new file mode 100644 index 0000000..7c3dac6 --- /dev/null +++ b/src/components/Offers/Subscription/Subscription.js @@ -0,0 +1,18 @@ +import React from 'react'; + +const Subscription = () => { + return ( +
+
+ Читайте нас в Telegram +
+
+

+ В нашем канале telegram вы не пропустите новые статьи, присоединяйтесь к другим разработчикам +

+ Подписаться +
+
+ ) +} +export default Subscription \ No newline at end of file diff --git a/src/components/Offers/Tags/TagItem.js b/src/components/Offers/Tags/TagItem.js index 598aa42..cd10bba 100644 --- a/src/components/Offers/Tags/TagItem.js +++ b/src/components/Offers/Tags/TagItem.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types' import { Link } from 'gatsby' import sligify from '../../../helpers/slugify' @@ -10,4 +11,8 @@ const TagItem = ({ title }) => { ) } -export default TagItem \ No newline at end of file +export default TagItem + +TagItem.propTypes = { + title: PropTypes.string +} \ No newline at end of file