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 { onMount } from "svelte";
|
||||||
import { goto } from "$app/navigation";
|
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 { VERT_NAME } from "$lib/consts";
|
||||||
import * as Layout from "$lib/components/layout";
|
import * as Layout from "$lib/components/layout";
|
||||||
import * as Navbar from "$lib/components/layout/Navbar";
|
import * as Navbar from "$lib/components/layout/Navbar";
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
// Enable plausible if enabled
|
// Enable plausible if enabled
|
||||||
enablePlausible = !!env.PUB_PLAUSIBLE_URL && Settings.instance.settings.plausible;
|
enablePlausible = !!PUB_PLAUSIBLE_URL && Settings.instance.settings.plausible;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -88,8 +88,8 @@
|
||||||
{#if enablePlausible}
|
{#if enablePlausible}
|
||||||
<script
|
<script
|
||||||
defer
|
defer
|
||||||
data-domain={env.PUB_HOSTNAME || "vert.sh"}
|
data-domain={PUB_HOSTNAME || "vert.sh"}
|
||||||
src="{env.PUB_PLAUSIBLE_URL}/js/script.pageview-props.tagged-events.js"
|
src="{PUB_PLAUSIBLE_URL}/js/script.pageview-props.tagged-events.js"
|
||||||
></script>
|
></script>
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { log } from "$lib/logger";
|
import { log } from "$lib/logger";
|
||||||
import * as Settings from "$lib/sections/settings/index.svelte";
|
import * as Settings from "$lib/sections/settings/index.svelte";
|
||||||
import { addToast } from "$lib/store/ToastProvider";
|
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 { SettingsIcon } from "lucide-svelte";
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
<div class="flex flex-col gap-4 flex-1">
|
<div class="flex flex-col gap-4 flex-1">
|
||||||
<Settings.Appearance />
|
<Settings.Appearance />
|
||||||
{#if env.PUB_PLAUSIBLE_URL}
|
{#if PUB_PLAUSIBLE_URL}
|
||||||
<Settings.Privacy {settings} />
|
<Settings.Privacy {settings} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue