fix edit profile
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user