File tree Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Original file line number Diff line number Diff line change 1010</template >
1111
1212<script setup>
13- import { VueRecaptcha } from " vue-recaptcha" ;
13+ import { VueRecaptcha } from " vue-recaptcha"
1414
15- const websocket_store = use_websocket_store ();
16- const cloud_store = use_cloud_store ();
17- const { is_captcha_validated } = storeToRefs (cloud_store);
15+ const websocket_store = use_websocket_store ()
16+ const cloud_store = use_cloud_store ()
17+ const { is_captcha_validated } = storeToRefs (cloud_store)
1818
19- const site_key = useRuntimeConfig ().public .RECAPTCHA_SITE_KEY ;
19+ const site_key = useRuntimeConfig ().public .RECAPTCHA_SITE_KEY
2020
21- onMounted (() => {
22- if (process .client ) {
23- const config = useRuntimeConfig ();
24- if (config .public .NODE_ENV !== " production" ) {
25- cloud_store .$patch ({ is_captcha_validated: true });
21+ onMounted (() => {
22+ if (process .client ) {
23+ const config = useRuntimeConfig ()
24+ if (config .public .NODE_ENV !== " production" ) {
25+ cloud_store .$patch ({ is_captcha_validated: true })
26+ }
2627 }
27- }
28- });
28+ })
2929
30- async function submit_recaptcha (token ) {
31- try {
32- const response = await $fetch .raw (
33- ` /.netlify/functions/recaptcha?token=${ token} `
34- );
35- cloud_store .$patch ({ is_captcha_validated: response .status == 200 });
36- recaptcha .reset ();
37- } catch (error) {
38- console .error (error);
30+ async function submit_recaptcha (token ) {
31+ try {
32+ const response = await $fetch .raw (
33+ ` /.netlify/functions/recaptcha?token=${ token} ` ,
34+ )
35+ cloud_store .$patch ({ is_captcha_validated: response .status == 200 })
36+ recaptcha .reset ()
37+ } catch (error) {
38+ console .error (error)
39+ }
3940 }
40- }
4141 </script >
You can’t perform that action at this time.
0 commit comments