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
8345fbeb56
commit
f15a73bd76
@ -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'
|
||||||
import slugify from '../../../helpers/slugify'
|
import slugify from '../../../helpers/slugify'
|
||||||
@ -14,3 +15,7 @@ const CategoryItem = ({ title }) => {
|
|||||||
|
|
||||||
export default CategoryItem
|
export default CategoryItem
|
||||||
|
|
||||||
|
CategoryItem.propTypes = {
|
||||||
|
title: PropTypes.string
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
const Search = ({ articlesLength }) => {
|
const Search = ({ articlesLength }) => {
|
||||||
return (
|
return (
|
||||||
@ -9,4 +10,8 @@ const Search = ({ articlesLength }) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Search
|
export default Search
|
||||||
|
|
||||||
|
Search.propTypes = {
|
||||||
|
articlesLength: PropTypes.number
|
||||||
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
import slugify from '../../helpers/slugify'
|
import slugify from '../../helpers/slugify'
|
||||||
import Img from "gatsby-image"
|
import Img from "gatsby-image"
|
||||||
import './Books.scss'
|
import './Books.scss'
|
||||||
@ -17,4 +18,10 @@ const Books = ({ data: { edges } }) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Books
|
export default Books
|
||||||
|
|
||||||
|
Books.propTypes = {
|
||||||
|
data: PropTypes.shape({
|
||||||
|
edges: PropTypes.array
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
import { Link } from 'gatsby'
|
import { Link } from 'gatsby'
|
||||||
import slugify from '../../../helpers/slugify'
|
import slugify from '../../../helpers/slugify'
|
||||||
|
|
||||||
@ -10,4 +11,8 @@ const BookItem = ({ title }) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default BookItem
|
export default BookItem
|
||||||
|
|
||||||
|
BookItem.propTypes = {
|
||||||
|
title: PropTypes.string
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user