0.1.6Updated a month ago
import { signal } from "@preact/signals";

export type RangeMode = "minutes" | "hours" | "days" | "weeks" | "months" | "custom";

export const rangeMode = signal<RangeMode>("hours");
export const rangeValue = signal<number>(6);

export const customRangeStart = signal<Date>(new Date(Date.now() - 1000 * 60 * 60 * 6));
export const customRangeEnd = signal<Date>(new Date());