Skip to content

Commit 1b16825

Browse files
appflowyclaude
andcommitted
fix: drop await on fire-and-forget calendar cell updates
Row dispatch hooks no longer return a Promise after the merge from main, so `await` on the result is a lint error and a no-op. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4934130 commit 1b16825

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/components/database/fullcalendar/CalendarContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export function CalendarContent({ onDataChange, normalToolbarRef, onDragEnd }: C
267267
}
268268

269269
// Update the row's date field to move it from NoDate to calendar
270-
await updateEventTime(rowId, startTimestamp, endTimestamp, allDay);
270+
updateEventTime(rowId, startTimestamp, endTimestamp, allDay);
271271

272272
// Mark the event as new for visual feedback
273273
setNewEventRowIds((prev) => new Set(prev).add(rowId));

src/components/database/fullcalendar/hooks/useCalendarEvents.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export function useCalendarEvents() {
2323

2424
// Create a function that can update any event's time directly
2525
const updateEventTime = useCallback(
26-
async (rowId: string, startTimestamp: string, endTimestamp?: string, isAllDay?: boolean) => {
26+
(rowId: string, startTimestamp: string, endTimestamp?: string, isAllDay?: boolean) => {
2727
Log.debug('📅 Updating event time:', { rowId, fieldId, startTimestamp, endTimestamp });
2828

29-
await updateCell(rowId, fieldId, startTimestamp, endTimestamp, isAllDay);
29+
updateCell(rowId, fieldId, startTimestamp, endTimestamp, isAllDay);
3030
},
3131
[fieldId, updateCell]
3232
);
@@ -61,7 +61,7 @@ export function useCalendarEvents() {
6161
const endTimestamp = correctedEndDate ? dateToUnixTimestamp(correctedEndDate) : undefined;
6262

6363
// Update the event time
64-
await updateEventTime(rowId, startTimestamp, endTimestamp, isAllDay);
64+
updateEventTime(rowId, startTimestamp, endTimestamp, isAllDay);
6565

6666
Log.debug('📅 Event time updated successfully');
6767
} catch (error) {
@@ -95,7 +95,7 @@ export function useCalendarEvents() {
9595
const endTimestamp = correctedEndDate ? dateToUnixTimestamp(correctedEndDate) : undefined;
9696

9797
// Update the event time
98-
await updateEventTime(rowId, startTimestamp, endTimestamp, isAllDay);
98+
updateEventTime(rowId, startTimestamp, endTimestamp, isAllDay);
9999

100100
Log.debug('📅 Event duration updated successfully');
101101
} catch (error) {

0 commit comments

Comments
 (0)