wip - committing to check out another branch

This commit is contained in:
2026-10-05 15:21:51 -07:00
parent feaa1c9f14
commit bc9fbaae6e
3 changed files with 33 additions and 18 deletions
@@ -4,21 +4,23 @@ import {useDashboardStore} from "@/store/useDashboardStore.jsx";
export default function IvansAlertsSettings({ widgetId, currentSettings }) {
const updateSettings = useDashboardStore(state => state.updateWidgetSettings);
console.log("currentSettings:", currentSettings);
return (
<Flex flexDirection="column" justifyContent="space-between" gap={2} pb={2}>
<Flex flexDirection="column" justifyContent="space-between" align="center" gap={2} pb={2}>
{/* SLIDER DATE RANGE SELECTION */}
<Slider.Root
width="80%" h="100%"
w="90%" h="100%"
min={1} max={14}
defaultValue={[7]}
defaultValue={[1]}
step={1}
onValueChangeEnd={(e) => {
console.log("change end", e);
const day = new Date(Date.now() - (e.value[0])*86400000).toLocaleDateString('en-CA');
console.log("new start: ", day);
updateSettings(widgetId, {...currentSettings, startDate: day});
}}
>
<Slider.Label>{currentSettings?.endDate} to {currentSettings?.startDate}</Slider.Label>
<Slider.Label>{currentSettings?.startDate} to {currentSettings?.endDate}</Slider.Label>
<Slider.Control>
<Slider.Track>
<Slider.Range />