From 77679dbf69ae097cefbbcabe9c2b952d446e9677 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 15 Feb 2022 22:11:07 +0000 Subject: add username in profile --- src/routes/player/[player]/[profile].svelte | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/routes') diff --git a/src/routes/player/[player]/[profile].svelte b/src/routes/player/[player]/[profile].svelte index c5276bc..8c1dcc0 100644 --- a/src/routes/player/[player]/[profile].svelte +++ b/src/routes/player/[player]/[profile].svelte @@ -5,7 +5,9 @@ export const load: Load = async ({ params, fetch }) => { const player: string = params.player const profile: string = params.profile - const res = await fetch(`${API_URL}player/${player}/${profile}`).then(r => r.json()) + const res = await fetch(`${API_URL}player/${player}/${profile}?customization=true`).then(r => + r.json() + ) return { props: { data: res, @@ -19,6 +21,7 @@ import Header from '$lib/Header.svelte' import Username from '$lib/Username.svelte' import { generateMetaDescription } from '$lib/profile' + import { twemojiHtml } from '$lib/utils' export let data @@ -30,3 +33,15 @@ `${data.member.username}\'s SkyBlock profile (${data.member.profileName})`} />
+ + + +
+

+ + {#if data.customization?.emoji} + {@html twemojiHtml(data.customization.emoji)} + {/if} + ({data.member.profileName}) +

+
-- cgit