mirror of
https://github.com/LaconicNetwork/laconic.com.git
synced 2026-01-16 13:14:07 +00:00
captcha rendering on partners page
This commit is contained in:
parent
bc1abad231
commit
1a356d20be
14
package-lock.json
generated
14
package-lock.json
generated
@ -81,7 +81,7 @@
|
||||
"stylelint-config-standard": "^25.0.0",
|
||||
"stylelint-config-standard-scss": "^3.0.0",
|
||||
"stylelint-prettier": "^2.0.0",
|
||||
"typescript": "^4.6.3"
|
||||
"typescript": "^4.8.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.x",
|
||||
@ -11114,9 +11114,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
|
||||
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
|
||||
"version": "4.8.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
|
||||
"integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
@ -19869,9 +19869,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
|
||||
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
|
||||
"version": "4.8.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
|
||||
"integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
|
||||
"dev": true
|
||||
},
|
||||
"ua-parser-js": {
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
"stylelint-config-standard": "^25.0.0",
|
||||
"stylelint-config-standard-scss": "^3.0.0",
|
||||
"stylelint-prettier": "^2.0.0",
|
||||
"typescript": "^4.6.3"
|
||||
"typescript": "^4.8.2"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/react": "~17.0.43"
|
||||
|
||||
@ -4,7 +4,7 @@ const SearchIcon = ({ className }: { className?: string }) => (
|
||||
height={22}
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...className}
|
||||
{...(typeof className === 'object' ? className : {})}
|
||||
>
|
||||
<path
|
||||
d="M9.313 16.625A7.312 7.312 0 1 0 9.313 2a7.312 7.312 0 0 0 0 14.625Z"
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import React, { useState } from 'react'
|
||||
// eslint-disable-next-line import/no-named-as-default
|
||||
import ReCAPTCHA from 'react-google-recaptcha'
|
||||
import Select from 'react-select'
|
||||
|
||||
import { Container } from '~/components/layout/container'
|
||||
@ -128,11 +127,6 @@ const CustomForm = ({ data }: FormProps) => {
|
||||
onChange={(e) => setText(e.target.value)}
|
||||
></textarea>
|
||||
</label>
|
||||
{/* <ReCAPTCHA
|
||||
siteKey={process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY}
|
||||
size="invisible"
|
||||
ref={reRef}
|
||||
/> */}
|
||||
<Button size="medium" variant="primary">
|
||||
{data?.formLabelButton}
|
||||
</Button>
|
||||
|
||||
@ -188,6 +188,12 @@
|
||||
border: none;
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
.recaptcha {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: black;
|
||||
}
|
||||
}
|
||||
|
||||
select {
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import { useState } from 'react'
|
||||
// eslint-disable-next-line import/no-named-as-default
|
||||
import ReCAPTCHA from 'react-google-recaptcha'
|
||||
import Select from 'react-select'
|
||||
|
||||
import Line from '~/components/icons/line'
|
||||
@ -54,6 +56,7 @@ const CustomForm = ({ data }: FormProps) => {
|
||||
const [errorMsg, setErrorMsg] = useState('')
|
||||
const [isFormSent, setIsFormSent] = useState(false)
|
||||
const [isSending, setIsSending] = useState(false)
|
||||
// const reRef = useRef<ReCAPTCHA>()
|
||||
|
||||
const handleSubmit = async (e: any) => {
|
||||
e.preventDefault()
|
||||
@ -78,6 +81,8 @@ const CustomForm = ({ data }: FormProps) => {
|
||||
role: role
|
||||
}
|
||||
|
||||
// const token = await reRef.current.executeAsync()
|
||||
|
||||
await fetch(`${process.env.NEXT_PUBLIC_API}/api/inquiry`, {
|
||||
method: 'POST',
|
||||
mode: 'no-cors',
|
||||
@ -190,6 +195,15 @@ const CustomForm = ({ data }: FormProps) => {
|
||||
onChange={(e) => setText(e.target.value)}
|
||||
></textarea>
|
||||
</label>
|
||||
<script
|
||||
src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"
|
||||
async
|
||||
defer
|
||||
></script>
|
||||
<ReCAPTCHA
|
||||
className="recaptcha"
|
||||
sitekey="6LcJ5LkhAAAAAJ841sJnn6LkwOg-5vt33X-wGEJW"
|
||||
/>
|
||||
<Button size="medium" variant="primary">
|
||||
{data?.contactButtonLabel}
|
||||
</Button>
|
||||
|
||||
1
tsconfig.tsbuildinfo
Normal file
1
tsconfig.tsbuildinfo
Normal file
File diff suppressed because one or more lines are too long
@ -6474,10 +6474,10 @@
|
||||
"resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz"
|
||||
"version" "0.8.1"
|
||||
|
||||
"typescript@^4.6.3", "typescript@>=2.7", "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", "typescript@>=3.3.1":
|
||||
"integrity" "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw=="
|
||||
"resolved" "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz"
|
||||
"version" "4.6.3"
|
||||
"typescript@^4.8.2", "typescript@>=2.7", "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", "typescript@>=3.3.1":
|
||||
"integrity" "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw=="
|
||||
"resolved" "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz"
|
||||
"version" "4.8.2"
|
||||
|
||||
"ua-parser-js@^0.7.30":
|
||||
"integrity" "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ=="
|
||||
|
||||
Loading…
Reference in New Issue
Block a user