AutofIll Zoom Link#4287
Open
nigelpurvis wants to merge 2 commits into
Open
Conversation
wavehassman
requested changes
Jun 19, 2026
| const theme = useTheme(); | ||
| const toast = useToast(); | ||
| const user = useCurrentUser(); | ||
| const { data: scheduleSettings } = useUserScheduleSettings(user.userId); |
Contributor
There was a problem hiding this comment.
need isError, isLoading and error
| if (personalZoomLink && !watch('zoomLink')) { | ||
| setValue('zoomLink', personalZoomLink); | ||
| } | ||
| }, [open, isEditMode, scheduleSettings, setValue, watch]); |
Contributor
There was a problem hiding this comment.
drop setValue and watch from the dependency array
replace watch('zoomLink') with getValues('zoomLink')
useEffect(() => {
if (!open || isEditMode) return;
if (scheduleSettings?.personalZoomLink && !getValues('zoomLink')) {
setValue('zoomLink', scheduleSettings.personalZoomLink);
}
}, [open, isEditMode, scheduleSettings]);
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
All of the changes went in EventModal.tsx, where I added the 'useUserScheduleSettings' import, called the hook to get the user's schedule settings, and then added a useEffect that autofills the Zoom link with the user's link from settings. Autofills when creating a new event in the calendar section.
Notes
Made it so the autofill only works when you are creating an event and not editing one.
Test Cases
Screenshots
Checklist
yarn.lockchanges (unless dependencies have changed)Closes #4252