Skip to content

Commit 494ed45

Browse files
pull from next
1 parent cffe216 commit 494ed45

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

components/Recaptcha.vue

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@
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>

0 commit comments

Comments
 (0)