import { createContext } from "preact";
import { useContext } from "preact/compat";
import { Reminder } from "../../api";

export const ReminderContext = createContext<
    [Reminder, (r: (reminder: Reminder) => Reminder) => void]
>([null, () => {}]);

export const useReminder = () => useContext(ReminderContext);
