fix: svelte didn't work the way i thought it did

This commit is contained in:
Sam 2023-06-03 03:17:24 +02:00
parent 8d0c2cce73
commit 3fe654a220
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
4 changed files with 12 additions and 14 deletions

View file

@ -31,7 +31,7 @@
import { DateTime } from "luxon";
import { encode } from "base64-arraybuffer";
import prettyBytes from "pretty-bytes";
import { env } from "$env/dynamic/public";
import { PUBLIC_SHORT_BASE } from "$env/static/public";
import { apiFetchClient, fastFetchClient } from "$lib/api/fetch";
import IconButton from "$lib/components/IconButton.svelte";
import EditableField from "../../EditableField.svelte";
@ -392,7 +392,7 @@
};
const copyShortURL = async () => {
const url = `${env.PUBLIC_SHORT_BASE}/${data.member.sid}`;
const url = `${PUBLIC_SHORT_BASE}/${data.member.sid}`;
await navigator.clipboard.writeText(url);
addToast({ body: "Copied the short link to your clipboard!", duration: 2000 });
};
@ -779,7 +779,7 @@
</strong>
</p>
</div>
{#if env.PUBLIC_SHORT_BASE}
{#if PUBLIC_SHORT_BASE}
<div class="col-md">
<p>
Current short ID: <code>{data.member.sid}</code>