-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrecipe.js
45 lines (43 loc) · 1.19 KB
/
recipe.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import PropTypes from 'prop-types';
const { arrayOf, number, shape, string } = PropTypes;
// Added proptypes
const RecipePropTypes = shape({
recipes: shape({
difficulty: string.isRequired,
ingredients: arrayOf(string.isRequired).isRequired,
instructions: string.isRequired,
preparationTime: number.isRequired,
relationships: shape({
category: shape({
name: string.isRequired
}).isRequired,
image: shape({
relationships: shape({
imageFile: shape({
localFile: shape({
childImageSharp: shape({
fixed: shape({
base64: string.isRequired,
height: number.isRequired,
src: string.isRequired,
srcSet: string.isRequired,
width: number.isRequired
}).isRequired,
fluid: shape({
aspectRatio: number.isRequired,
base64: string.isRequired,
sizes: string.isRequired,
src: string.isRequired,
srcSet: string.isRequired
}).isRequired
}).isRequired
}).isRequired
}).isRequired
}).isRequired
}).isRequired
}).isRequired,
title: string.isRequired,
totalTime: number.isRequired
}).isRequired
}).isRequired;
export default RecipePropTypes;