Skip to content

Commit 1507954

Browse files
authored
fix: animation and default captcha key (#43)
1 parent 6eb01ab commit 1507954

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/ui/Recaptcha.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<template>
2-
<vue-recaptcha theme="dark" :size="screenWidth < 768 ? 'compact' : 'normal'" :sitekey="captchakey" @verify="handleSuccess" @error="handleError"></vue-recaptcha>
2+
<vue-recaptcha theme="dark" :size="screenWidth < 768 ? 'compact' : 'normal'" :sitekey="captchakey" @verify="handleSuccess" @error="handleError" v-if="captchakey"></vue-recaptcha>
33
</template>
44

55
<script setup lang="ts">
6-
import { onMounted } from 'vue'
76
import { useWindowSize } from '@vueuse/core'
87
98
type Props = {
10-
captchakey: string
9+
captchakey: string | undefined
1110
}
1211
defineProps<Props>()
1312

src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { createApp } from 'vue'
22
import { createPinia } from 'pinia'
33
import { VueRecaptcha } from 'vue-recaptcha'
4+
import { faucetDetailPlugin } from '@/stores/faucetDetail'
45

56
import './style.css'
67
import App from './App.vue'
78

89
const pinia = createPinia()
10+
pinia.use(faucetDetailPlugin)
11+
912
const app = createApp(App)
1013

1114
app.use(pinia)

0 commit comments

Comments
 (0)