import { DateTime } from 'luxon';
import { useCallback, useState } from 'react';
import { useInterval } from '../../lib/ui/use-interval.js';
export function useCurrentTime() {
    const [date, setDate] = useState(DateTime.now());
    const update = useCallback(() => {
        setDate(DateTime.now());
    }, [setDate]);
    useInterval(update);
    return date;
}
//# sourceMappingURL=use-current-time.js.map