We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77be61f commit c369bc2Copy full SHA for c369bc2
src/components/captcha.tsx
@@ -13,7 +13,10 @@ type Props = Omit<ComponentProps<typeof Turnstile>, 'siteKey'> & {
13
validationError?: string
14
}
15
16
-export const Captcha = (props: Props) => {
+export const Captcha = ({
17
+ validationError,
18
+ ...props
19
+}: Props) => {
20
const { isTurnstileEnabled } = useConfigStore()
21
22
return (
@@ -28,9 +31,9 @@ export const Captcha = (props: Props) => {
28
31
siteKey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY || ''}
29
32
/>
30
33
- {props?.validationError && (
34
+ {validationError && (
35
<FormMessage className="text-red-500 mt-2">
- {props.validationError}
36
+ {validationError}
37
</FormMessage>
38
)}
39
</>
0 commit comments