From e0c94b857ff833264aeeab813df9c8b1fd19f32e Mon Sep 17 00:00:00 2001 From: Cayla Hamann Date: Tue, 23 Jun 2020 15:34:53 -0400 Subject: [PATCH] fix: added propTypes --- src/components/NavigationItems.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/components/NavigationItems.js b/src/components/NavigationItems.js index 4003b9edb..32134b7bc 100644 --- a/src/components/NavigationItems.js +++ b/src/components/NavigationItems.js @@ -1,4 +1,5 @@ import React, { Fragment, useState, useContext } from 'react'; +import PropTypes from 'prop-types'; import FeatherIcon from './FeatherIcon'; import NewRelicIcon from './NewRelicIcon'; import { Link } from 'gatsby'; @@ -151,4 +152,19 @@ const NavItem = ({ page, depthLevel, searchTerm, filteredPageNames }) => { ); }; +NavigationItems.propTypes = { + pages: PropTypes.array, + filteredPageNames: PropTypes.array, + searchTerm: PropTypes.string, + depthLevel: PropTypes.number, +}; + +NavItem.propTypes = { + page: PropTypes.shape({ + displayName: PropTypes.string, + url: PropTypes.string, + children: PropTypes.array, + }), +}; + export default NavigationItems;