mirror of https://github.com/VERT-sh/VERT.git
fix: build error
cant use dynamic envs on prerendered components
This commit is contained in:
parent
75e63ff94b
commit
c2e9b02fec
|
@ -2,7 +2,7 @@
|
|||
import { onMount } from "svelte";
|
||||
import { goto } from "$app/navigation";
|
||||
|
||||
import { env } from "$env/dynamic/public";
|
||||
import { PUB_PLAUSIBLE_URL, PUB_HOSTNAME } from "$env/static/public";
|
||||
import { VERT_NAME } from "$lib/consts";
|
||||
import * as Layout from "$lib/components/layout";
|
||||
import * as Navbar from "$lib/components/layout/Navbar";
|
||||
|
@ -49,7 +49,7 @@
|
|||
|
||||
$effect(() => {
|
||||
// Enable plausible if enabled
|
||||
enablePlausible = !!env.PUB_PLAUSIBLE_URL && Settings.instance.settings.plausible;
|
||||
enablePlausible = !!PUB_PLAUSIBLE_URL && Settings.instance.settings.plausible;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -88,8 +88,8 @@
|
|||
{#if enablePlausible}
|
||||
<script
|
||||
defer
|
||||
data-domain={env.PUB_HOSTNAME || "vert.sh"}
|
||||
src="{env.PUB_PLAUSIBLE_URL}/js/script.pageview-props.tagged-events.js"
|
||||
data-domain={PUB_HOSTNAME || "vert.sh"}
|
||||
src="{PUB_PLAUSIBLE_URL}/js/script.pageview-props.tagged-events.js"
|
||||
></script>
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import { log } from "$lib/logger";
|
||||
import * as Settings from "$lib/sections/settings/index.svelte";
|
||||
import { addToast } from "$lib/store/ToastProvider";
|
||||
import { env } from "$env/dynamic/public";
|
||||
import { PUB_PLAUSIBLE_URL } from "$env/static/public";
|
||||
import { SettingsIcon } from "lucide-svelte";
|
||||
import { onMount } from "svelte";
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
<div class="flex flex-col gap-4 flex-1">
|
||||
<Settings.Appearance />
|
||||
{#if env.PUB_PLAUSIBLE_URL}
|
||||
{#if PUB_PLAUSIBLE_URL}
|
||||
<Settings.Privacy {settings} />
|
||||
{/if}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue