Skip to content

Commit

Permalink
fix(skin3d): update profile handling in Skin3D component
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthGigi committed Jan 7, 2025
1 parent 6fdcf41 commit 89148c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib/components/Skin3D.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import * as skinview3d from "skinview3d";
import { onMount } from "svelte";
const { profile } = getProfileCtx();
const ctx = getProfileCtx();
const profile = $derived(ctx.profile);
let { class: className }: { class: string | undefined } = $props();
let viewer: skinview3d.SkinViewer;
Expand Down
4 changes: 3 additions & 1 deletion src/lib/layouts/stats/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
<div class="fixed left-0 top-1/2 z-10 hidden h-dvh w-[30vw] -translate-y-1/2 @container @[75rem]/parent:block">
{#if browser && window.innerWidth >= 1200}
{#await import('$lib/components/Skin3D.svelte') then { default: Skin3D }}
<Skin3D class="h-full" />
{#key profile}
<Skin3D class="h-full" />
{/key}
{/await}
{/if}
</div>
Expand Down

0 comments on commit 89148c5

Please sign in to comment.