Skip to content

Commit

Permalink
fix captcha env var and add padding
Browse files Browse the repository at this point in the history
  • Loading branch information
westerandr committed May 20, 2024
1 parent e5fbe1f commit d59440c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib/components/Contact.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const env = import.meta.env.VITE_ENV ?? 'development';
const formSpree = import.meta.env.VITE_FORMSPREE ?? '#';
const recaptchaSiteKey = import.meta.env.RECAPTCHA_SITE_KEY;
const recaptchaSiteKey = import.meta.env.VITE_RECAPTCHA_SITE_KEY;
const toast = getToastStore();
let firstname = '';
Expand Down Expand Up @@ -183,7 +183,7 @@
required
/>
</label>
{#if recaptchaSiteKey && env === 'production'}
{#if recaptchaSiteKey && env !== 'development'}
<div class="g-recaptcha" data-sitekey={recaptchaSiteKey}></div>
{/if}
<div class="mx-2 mt-2 mb-6 text-white bg-blue-500 rounded-xl md:justify-self-end btn">
Expand All @@ -197,4 +197,7 @@
.sch-email {
word-break: break-word;
}
.g-recaptcha {
padding-left: 0.75rem;
}
</style>

0 comments on commit d59440c

Please sign in to comment.