Skip to content

Commit 9332132

Browse files
Merge pull request #32 from Geode-solutions/fix_recaptcha
fix(recaptcha): site_key not a prop anymore
2 parents 554bfc4 + d662783 commit 9332132

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

components/Launcher.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ const websocket_store = use_websocket_store()
2222
const cloud_store = use_cloud_store()
2323
const { is_cloud_running, is_captcha_validated, is_connexion_launched } = storeToRefs(cloud_store)
2424
25-
const props = defineProps({
26-
site_key: { type: String, required: true }
27-
})
28-
29-
const { site_key } = toRefs(props)
25+
const site_key = useRuntimeConfig().public.RECAPTCHA_SITE_KEY
3026
3127
watch(is_captcha_validated, async (value) => {
3228
if (value === true && process.client) {
@@ -44,7 +40,7 @@ onMounted(() => {
4440
}
4541
})
4642
47-
async function submit_recaptcha(token) {
43+
async function submit_recaptcha (token) {
4844
try {
4945
const response = await $fetch.raw(`/.netlify/functions/recaptcha?token=${token}`)
5046
cloud_store.$patch({ is_captcha_validated: response.status == 200 })

components/Wrapper.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Header :tool_name="tool_name" :cards_list="cards_list" />
66
</v-col>
77
<v-col v-if="!is_cloud_running">
8-
<Launcher :site_key="site_key" />
8+
<Launcher />
99
</v-col>
1010
<v-col v-if="is_cloud_running">
1111
<Stepper />
@@ -23,9 +23,8 @@ const { is_cloud_running } = storeToRefs(cloud_store)
2323
2424
const props = defineProps({
2525
cards_list: { type: Array, required: true },
26-
site_key: { type: String, required: true }
2726
})
28-
const { cards_list, site_key } = props
27+
const { cards_list } = props
2928
3029
const stepper_tree = inject('stepper_tree')
3130
const { tool_name, route_prefix } = stepper_tree

0 commit comments

Comments
 (0)