Skip to content

Commit 0ee2089

Browse files
committed
Fix issue with static env
1 parent b9ec7d3 commit 0ee2089

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/routes/+page.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import { env } from '$env/dynamic/public';
1515
import type { PageData } from './$types';
1616
import { DHMToSeconds, secondsToDHM } from '$lib/utils/time';
17-
import { PUBLIC_ANONYMOUS_PASTES_ENABLED } from '$env/static/public';
1817
1918
export let data: PageData;
2019
@@ -204,7 +203,7 @@
204203
class:hidden={content}
205204
bind:this={placeholderRef}
206205
>
207-
{#if PUBLIC_ANONYMOUS_PASTES_ENABLED === 'false' && !data.loggedIn}
206+
{#if env.PUBLIC_ANONYMOUS_PASTES_ENABLED === 'false' && !data.loggedIn}
208207
Anonymous pastes are disabled on this server. <br />
209208
You need to login to save pastes.
210209
{:else}
@@ -222,7 +221,7 @@
222221
<div class="flex flex-col items-center gap-4">
223222
<h1 class="text-4xl mb-5 max-sm:hidden"><a href="/">YABin</a></h1>
224223

225-
{#if PUBLIC_ANONYMOUS_PASTES_ENABLED === 'false' && !data.loggedIn}
224+
{#if env.PUBLIC_ANONYMOUS_PASTES_ENABLED === 'false' && !data.loggedIn}
226225
<button
227226
class="bg-amber-500 text-black text-lg px-4 py-1 my-1 w-full max-sm:hidden"
228227
title="{cmdKey}+S"

0 commit comments

Comments
 (0)