mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
Move date range selection into redux.
This commit is contained in:
parent
d06c077019
commit
c5cb19a3bf
21 changed files with 141 additions and 138 deletions
|
|
@ -12,8 +12,10 @@ const options = {
|
|||
export default function QuickButtons({ value, onChange }) {
|
||||
const selectedItem = Object.keys(options).find(key => options[key] === value);
|
||||
|
||||
function handleClick(value) {
|
||||
onChange(getDateRange(options[value]));
|
||||
function handleClick(selected) {
|
||||
if (options[selected] !== value) {
|
||||
onChange(getDateRange(options[selected]));
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue