Skip to content

Commit

Permalink
fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JorrinKievit committed Aug 22, 2024
1 parent 88a430a commit a23dc71
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/routes/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,14 @@ function Login() {
<FormItem>
<FormControl>
<TurnstileWidget
{...field}
id={field.name}
onSuccess={(token) => {
form.setValue("ttkn", token);
}}
onExpire={() => form.setError("ttkn", { message: "Captcha expired" })}
onError={() => form.setError("ttkn", { message: "Captcha not completed" })}
onUnsupported={() => form.setError("ttkn", { message: "Captcha not supported" })}
onTimeout={() => form.setError("ttkn", { message: "Captcha timed out" })}
/>
</FormControl>
<FormMessage />
Expand Down
6 changes: 5 additions & 1 deletion src/routes/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,14 @@ function Register() {
<FormItem>
<FormControl>
<TurnstileWidget
{...field}
id={field.name}
onSuccess={(token) => {
form.setValue("ttkn", token);
}}
onExpire={() => form.setError("ttkn", { message: "Captcha expired" })}
onError={() => form.setError("ttkn", { message: "Captcha not completed" })}
onUnsupported={() => form.setError("ttkn", { message: "Captcha not supported" })}
onTimeout={() => form.setError("ttkn", { message: "Captcha timed out" })}
/>
</FormControl>
<FormMessage />
Expand Down

0 comments on commit a23dc71

Please sign in to comment.