From 5766d3ac296553f567425fa3953858c395b06e6f Mon Sep 17 00:00:00 2001 From: Alexander Klein Date: Tue, 16 Feb 2021 13:35:16 +0100 Subject: [PATCH] feature(components): prop-type RefreshButton --- components/common/RefreshButton.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/common/RefreshButton.js b/components/common/RefreshButton.js index b1b80a83..53f68a84 100644 --- a/components/common/RefreshButton.js +++ b/components/common/RefreshButton.js @@ -1,4 +1,5 @@ import React, { useState, useEffect } from 'react'; +import PropTypes from 'prop-types'; import { useDispatch, useSelector } from 'react-redux'; import { FormattedMessage } from 'react-intl'; import { setDateRange } from 'redux/actions/websites'; @@ -8,7 +9,7 @@ import Dots from 'assets/ellipsis-h.svg'; import useDateRange from 'hooks/useDateRange'; import { getDateRange } from '../../lib/date'; -export default function RefreshButton({ websiteId }) { +function RefreshButton({ websiteId }) { const dispatch = useDispatch(); const [dateRange] = useDateRange(websiteId); const [loading, setLoading] = useState(false); @@ -35,3 +36,9 @@ export default function RefreshButton({ websiteId }) { /> ); } + +RefreshButton.propTypes = { + websiteId: PropTypes.number, +}; + +export default RefreshButton;