scheduling functions now works

This commit is contained in:
2025-09-19 21:25:37 -05:00
parent f93b39d7a9
commit a8bbfebd00
7 changed files with 105 additions and 134 deletions

View File

@@ -14,7 +14,7 @@ const nextOccurrenceMs = (hhmm: string, from = new Date()): number => {
};
export const LunchReminder = () => {
const setStatus = useMutation(api.statuses.create);
const setStatus = useMutation(api.statuses.createLunchStatus);
const timeoutRef = useRef<number | null>(null);
const user = useQuery(api.auth.getUser);
const lunchTime = user?.lunchTime ?? '';
@@ -44,7 +44,7 @@ export const LunchReminder = () => {
description: 'Would you like to set your status to "At lunch"?',
action: {
label: 'Set to lunch',
onClick: () => void setStatus({ message: 'At lunch' }),
onClick: () => void setStatus(),
},
cancel: {
label: 'Not now',