-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix calendar events right drawer empty fields (#6271)
Fix calendar events right drawer empty fields
- Loading branch information
1 parent
364caf0
commit 2218e20
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...es/twenty-front/src/modules/activities/calendar/components/CalendarEventDetailsEffect.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { CalendarEvent } from '@/activities/calendar/types/CalendarEvent'; | ||
import { useUpsertRecordsInStore } from '@/object-record/record-store/hooks/useUpsertRecordsInStore'; | ||
import { useEffect } from 'react'; | ||
|
||
type CalendarEventDetailsEffectProps = { | ||
record: CalendarEvent; | ||
}; | ||
|
||
export const CalendarEventDetailsEffect = ({ | ||
record, | ||
}: CalendarEventDetailsEffectProps) => { | ||
const { upsertRecords } = useUpsertRecordsInStore(); | ||
|
||
useEffect(() => { | ||
if (!record) { | ||
return; | ||
} | ||
|
||
upsertRecords([record]); | ||
}, [record, upsertRecords]); | ||
|
||
return <></>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters