Skip to content

Commit aaf9cff

Browse files
Added PropType checking
1 parent 4d24a29 commit aaf9cff

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

src/components/elements/FourColGrid/FourColGrid.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React from "react";
2+
import PropTypes from "prop-types";
23
import "./FourColGrid.css";
34

4-
export default function FourColGrid(props) {
5+
function FourColGrid(props) {
56
const renderElements = () => {
67
const gridElements = props.children.map((element, i) => {
78
return (
@@ -19,3 +20,10 @@ export default function FourColGrid(props) {
1920
</div>
2021
);
2122
}
23+
24+
FourColGrid.propTypes = {
25+
header: PropTypes.string,
26+
loading: PropTypes.bool
27+
};
28+
29+
export default FourColGrid;

src/components/elements/MovieThumb/MovieThumb.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import React from "react";
22
import { Link } from "react-router-dom";
3+
import PropTypes from "prop-types";
34
import "./MovieThumb.css";
45

5-
export default function MovieThumb(props) {
6+
function MovieThumb(props) {
67
return (
78
<div className="rmdb-moviethumb">
89
{props.clickable ? (
@@ -20,3 +21,11 @@ export default function MovieThumb(props) {
2021
</div>
2122
);
2223
}
24+
25+
MovieThumb.propTypes = {
26+
image: PropTypes.string,
27+
movieId: PropTypes.number,
28+
movieName: PropTypes.string
29+
};
30+
31+
export default MovieThumb;

0 commit comments

Comments
 (0)