mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Refresh should reset date range.
This commit is contained in:
parent
c984f4c6ae
commit
fd8df387c8
1 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import Button from './Button';
|
|||
import Refresh from 'assets/redo.svg';
|
||||
import Dots from 'assets/ellipsis-h.svg';
|
||||
import { useDateRange } from 'hooks/useDateRange';
|
||||
import { getDateRange } from '../../lib/date';
|
||||
|
||||
export default function RefreshButton({ websiteId }) {
|
||||
const dispatch = useDispatch();
|
||||
|
|
@ -15,7 +16,7 @@ export default function RefreshButton({ websiteId }) {
|
|||
function handleClick() {
|
||||
if (dateRange) {
|
||||
setLoading(true);
|
||||
dispatch(setDateRange(websiteId, dateRange));
|
||||
dispatch(setDateRange(websiteId, getDateRange(dateRange.value)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue