scheduling functions now works
This commit is contained in:
@@ -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',
|
||||
|
Reference in New Issue
Block a user