fix edit profile

This commit is contained in:
Davide Scaini
2026-04-09 13:21:47 +02:00
parent fb202b4edf
commit 5a29259259
2 changed files with 173 additions and 3 deletions
+3 -2
View File
@@ -23,6 +23,7 @@
let mounted = false;
const editUrl = import.meta.env.PUBLIC_EDIT_URL ?? '';
const editEnabled = editUrl !== '' || import.meta.env.PUBLIC_EDIT_ENABLED === 'true';
$: if (mounted) {
const params = new URLSearchParams(window.location.search);
@@ -94,7 +95,7 @@
>{tab.label}</button>
{/each}
</nav>
{#if editUrl}
{#if editEnabled}
<button
on:click={() => drawerOpen = true}
class="mb-2 px-3 py-1.5 text-xs border border-zinc-700 hover:border-zinc-500 text-zinc-400 hover:text-white rounded-md transition-colors"
@@ -168,7 +169,7 @@
{/if}
{#if drawerOpen && editUrl}
{#if drawerOpen && editEnabled}
<AthleteDrawer
{editUrl}
on:close={() => drawerOpen = false}