We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19ac87b commit 61fa7daCopy full SHA for 61fa7da
1 file changed
apps/web-app/src/routes/(auth)/_layout.login.tsx
@@ -1,3 +1,4 @@
1
+import { useEffect } from "react";
2
import { loginEmailMutationOptions } from "@/rpc/auth";
3
import { getInvitationByEmailQueryOptions } from "@/rpc/organization/organization";
4
import { Button } from "@asyncstatus/ui/components/button";
@@ -77,6 +78,12 @@ function RouteComponent() {
77
78
},
79
});
80
81
+ useEffect(() => {
82
+ if (invitation.data?.hasUser && invitation.data?.email) {
83
+ form.setValue("email", invitation.data.email);
84
+ }
85
+ }, [invitation.data, form]);
86
+
87
const loginEmail = useMutation({
88
...loginEmailMutationOptions(),
89
async onSuccess() {
0 commit comments