Skip to content

Commit c369bc2

Browse files
fix: Fix the Captcha component
1 parent 77be61f commit c369bc2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/components/captcha.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ type Props = Omit<ComponentProps<typeof Turnstile>, 'siteKey'> & {
1313
validationError?: string
1414
}
1515

16-
export const Captcha = (props: Props) => {
16+
export const Captcha = ({
17+
validationError,
18+
...props
19+
}: Props) => {
1720
const { isTurnstileEnabled } = useConfigStore()
1821

1922
return (
@@ -28,9 +31,9 @@ export const Captcha = (props: Props) => {
2831
siteKey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY || ''}
2932
/>
3033

31-
{props?.validationError && (
34+
{validationError && (
3235
<FormMessage className="text-red-500 mt-2">
33-
{props.validationError}
36+
{validationError}
3437
</FormMessage>
3538
)}
3639
</>

0 commit comments

Comments
 (0)