Skip to content

Commit

Permalink
chore: type turnstile component
Browse files Browse the repository at this point in the history
  • Loading branch information
Yizack committed Sep 23, 2024
1 parent a0100a1 commit 519eda3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions app/pages/signup.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script setup lang="ts">
import { NuxtTurnstile } from "#components";
definePageMeta({ layout: "access", middleware: "authenticated" });
const { query } = useRoute("signup");
Expand All @@ -11,7 +13,7 @@ const { form, formReset } = useFormState({
turnstile: ""
});
const turnstile = ref(null);
const turnstile = ref<InstanceType<typeof NuxtTurnstile>>();
const submit = ref({ loading: false, exists: false });
const needsConfirm = ref(false);
Expand All @@ -24,15 +26,13 @@ const signUp = async () => {
if (!req) {
formReset();
// @ts-expect-error turnstile is not null
turnstile.value?.reset();
return;
}
if (!("user" in req)) {
submit.value.exists = true;
formReset();
// @ts-expect-error turnstile is not null
turnstile.value?.reset();
return;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@nuxthub/core": "^0.7.19",
"@nuxtjs/color-mode": "^3.5.1",
"@nuxtjs/sitemap": "^6.1.0",
"@nuxtjs/turnstile": "^0.9.7",
"@nuxtjs/turnstile": "^0.9.10",
"@paddle/paddle-js": "^1.2.1",
"@paddle/paddle-node-sdk": "^1.7.0",
"@types/bootstrap": "^5.2.10",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 519eda3

Please sign in to comment.