Skip to content

Commit

Permalink
fix(web): use dynamic/public env for fetching user's avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
manekenpix committed Jul 13, 2024
1 parent e960584 commit bdaa707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/lib/Avatar.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { PUBLIC_API_HOST } from '$env/static/public';
import { env } from '$env/dynamic/public';
import { onMount } from 'svelte';
export let username: string;
export let isLarge: Boolean = false;
Expand All @@ -12,7 +12,7 @@
const imageClass = `inline-block text-center rounded-full bg-accent text-text select-none ${
isLarge ? 'h-24 w-24 text-8xl' : 'h-6 w-6 has-tooltip'
}`;
const fullPath = `${PUBLIC_API_HOST || 'http://localhost:4000'}/images/${username}`;
const fullPath = `${env.PUBLIC_API_HOST || 'http://localhost:4000'}/images/${username}`;
onMount(() => {
const img = new Image();
Expand Down

0 comments on commit bdaa707

Please sign in to comment.