watch invites to ensure reactivity i (#25755)
This commit is contained in:
1 parent
6b62557a92
commit
34e1122667
1 file changed
+4
-5
@@ -125,14 +125,13 @@ export const TeamInviteEmailView = ({ userEmail }: TeamInviteEmailViewProps) =>
|
||||
router.replace(gettingStartedPath);
|
||||
};
|
||||
|
||||
const hasValidInvites = fields.some((_, index) => {
|
||||
const email = form.watch(`invites.${index}.email`);
|
||||
return email && email.trim().length > 0;
|
||||
});
|
||||
|
||||
// Watch form values to pass to browser view for real-time updates
|
||||
const watchedInvites = form.watch("invites");
|
||||
|
||||
const hasValidInvites = watchedInvites.some((invite) => {
|
||||
return invite.email && invite.email.trim().length > 0;
|
||||
});
|
||||
|
||||
return (
|
||||
<OnboardingLayout userEmail={userEmail} currentStep={3} totalSteps={3}>
|
||||
{/* Left column - Main content */}
|
||||
|
||||
Reference in new issue
Block a user