Move date range selection into redux.
This commit is contained in:
1 parent
d06c077019
commit
c5cb19a3bf
21 files changed
+141
-138
No files matched your search
@@ -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 (
|
||||
|
||||
Reference in new issue
Block a user