Skip to content

Commit

Permalink
Fix issue with static env
Browse files Browse the repository at this point in the history
  • Loading branch information
Yureien committed Mar 29, 2024
1 parent b9ec7d3 commit 0ee2089
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import { env } from '$env/dynamic/public';
import type { PageData } from './$types';
import { DHMToSeconds, secondsToDHM } from '$lib/utils/time';
import { PUBLIC_ANONYMOUS_PASTES_ENABLED } from '$env/static/public';
export let data: PageData;
Expand Down Expand Up @@ -204,7 +203,7 @@
class:hidden={content}
bind:this={placeholderRef}
>
{#if PUBLIC_ANONYMOUS_PASTES_ENABLED === 'false' && !data.loggedIn}
{#if env.PUBLIC_ANONYMOUS_PASTES_ENABLED === 'false' && !data.loggedIn}
Anonymous pastes are disabled on this server. <br />
You need to login to save pastes.
{:else}
Expand All @@ -222,7 +221,7 @@
<div class="flex flex-col items-center gap-4">
<h1 class="text-4xl mb-5 max-sm:hidden"><a href="/">YABin</a></h1>

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

0 comments on commit 0ee2089

Please sign in to comment.