Skip to content

Commit

Permalink
fix: Don't show cancel edit button on creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ushie committed Dec 4, 2024
1 parent 01c356a commit 3b1b025
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/announcements/[slug]/AdminButtons.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
icon={archivedAtElement ? 'unarchive' : 'archive'}
on:click={toggleArchived}
/>
<Button type="icon" icon={'close'} on:click={() => (isEditing = false)} />
{#if isEditing}
<Button type="icon" icon={'close'} on:click={() => (isEditing = false)} />
{/if}
<Button type="icon" icon={'check'} on:click={isEditing ? save : createAnnouncement} />
{:else}
<Button type="icon" icon={'delete'} on:click={() => (showDeleteConfirm = !showDeleteConfirm)} />
Expand Down

0 comments on commit 3b1b025

Please sign in to comment.