mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 15:23:38 +01:00
feature(components): prop-type RefreshButton
This commit is contained in:
parent
86ec5774b6
commit
5766d3ac29
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user