Skip to content

Commit

Permalink
fix: incorrect data in sign-up mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
olexh committed May 8, 2024
1 parent 4f3c218 commit 169ef55
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/modals/auth-modal/components/signup-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ const Component = () => {
...data
}: z.infer<typeof formSchema>) =>
signup({
...data,
params: {
...data
},
captcha: String(captchaRef.current?.getResponse()),
}),
onSuccess: async (data) => {
await setCookie('auth', data.secret);
form.reset();
closeModal();
router.refresh();

Expand All @@ -67,6 +68,8 @@ const Component = () => {
</span>,
{ variant: 'success' },
);

form.reset();
},
onError: () => {
captchaRef.current?.reset();
Expand Down

0 comments on commit 169ef55

Please sign in to comment.