Skip to content

Commit 616bfd5

Browse files
fix(recaptcha): resolve merge conflict
1 parent 33bdf99 commit 616bfd5

File tree

1 file changed

+14
-37
lines changed

1 file changed

+14
-37
lines changed

components/Launcher.vue

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,44 +20,21 @@
2020
</template>
2121

2222
<script setup>
23-
import { VueRecaptcha } from "vue-recaptcha"
24-
const websocket_store = use_websocket_store()
25-
const cloud_store = use_cloud_store()
26-
const { is_captcha_validated } = storeToRefs(cloud_store)
23+
import { VueRecaptcha } from "vue-recaptcha"
24+
const websocket_store = use_websocket_store()
25+
const cloud_store = use_cloud_store()
26+
const { is_captcha_validated } = storeToRefs(cloud_store)
2727
28-
const site_key = useRuntimeConfig().public.RECAPTCHA_SITE_KEY
28+
const site_key = useRuntimeConfig().public.RECAPTCHA_SITE_KEY
2929
30-
watch(is_captcha_validated, async (value) => {
31-
if (value === true && process.client) {
32-
await cloud_store.create_connexion()
33-
await websocket_store.ws_connect()
34-
}
35-
})
36-
37-
onMounted(() => {
38-
<<<<<<< HEAD
39-
console.log("onMounted", useRuntimeConfig())
40-
})
41-
=======
42-
if (process.client) {
43-
console.log("useRuntimeConfig()", useRuntimeConfig())
44-
const config = useRuntimeConfig()
45-
if (config.public.NODE_ENV !== "production") {
46-
cloud_store.$patch({ is_captcha_validated: true })
47-
}
48-
}
49-
})
50-
51-
async function submit_recaptcha(token) {
52-
try {
53-
const response = await $fetch.raw(
54-
`/.netlify/functions/recaptcha?token=${token}`,
55-
)
56-
cloud_store.$patch({ is_captcha_validated: response.status == 200 })
57-
recaptcha.reset()
58-
} catch (error) {
59-
console.error(error)
60-
}
30+
watch(is_captcha_validated, async (value) => {
31+
if (value === true && process.client) {
32+
await cloud_store.create_connexion()
33+
await websocket_store.ws_connect()
6134
}
62-
>>>>>>> 96ad5440029efa83fba9a0825d38e5ca6625e9ae
35+
})
36+
37+
onMounted(() => {
38+
console.log("onMounted", useRuntimeConfig())
39+
})
6340
</script>

0 commit comments

Comments
 (0)