feat: dev and PUBLIC_DEBUG_FORMS variables to environment imports

This commit is contained in:
Bart van der Braak 2024-02-20 20:45:17 +01:00
parent 28721b4ba5
commit bdaeb428db
5 changed files with 15 additions and 10 deletions

View file

@ -16,7 +16,8 @@
<script lang="ts">
import { ChevronDown } from "radix-icons-svelte";
import { browser } from "$app/environment";
import { browser, dev } from "$app/environment";
import { PUBLIC_DEBUG_FORMS } from "$env/static/public";
import SuperDebug, { type SuperValidated, type Infer, superForm } from "sveltekit-superforms";
import * as Form from "$lib/components/ui/form";
import * as RadioGroup from "$lib/components/ui/radio-group";
@ -127,6 +128,6 @@
<Form.Button>Update preferences</Form.Button>
</form>
{#if browser}
{#if dev && PUBLIC_DEBUG_FORMS == 'true' && browser}
<SuperDebug data={$formData} />
{/if}