Skip to content

Commit 7566de8

Browse files
committed
Hide my links
1 parent 55619a7 commit 7566de8

File tree

2 files changed

+33
-34
lines changed

2 files changed

+33
-34
lines changed

package-lock.json

Lines changed: 12 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/routes/+page.svelte

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
Icon,
77
LinkButton,
88
IconButton,
9-
Icon,
109
Space,
1110
getSessionInfo,
1211
refreshAccessToken,
@@ -415,26 +414,28 @@
415414

416415
<Space height="var(--token-space-4)" />
417416

418-
<FlexWrapper alignitems="flex-start" width="80%">
419-
<h2>Your links:</h2>
420-
<FlexWrapper gap="var(--token-space-3)" justifycontent={width > 600 ? "flex-start" : "space-evenly"} direction="row" wrap="wrap">
421-
{#each $customLinks as link (link.id)}
422-
<a class="option" href={link.url} target="_blank">
423-
<FlexWrapper width="100%" height="100%" gap="var(--token-space-2)">
424-
<p class="option-text">{link.name}</p>
425-
<IconButton onClick={() => editLinkPrompt(link)} icon="edit" alt="edit"/>
426-
<IconButton onClick={() => remove_custom_link(link.id)} icon="delete" alt="delete"/>
427-
</FlexWrapper>
428-
</a>
429-
{/each}
430-
<!-- Button to add a new link -->
431-
<div class="option" onclick={addLinkPrompt}>
432-
<FlexWrapper width="100%" height="100%" justifycontent="center" alignitems="center">
433-
<Icon icon="add" size="5rem"/>
434-
</FlexWrapper>
435-
</div>
417+
{#if time.length < 0}
418+
<FlexWrapper alignitems="flex-start" width="80%">
419+
<h2>Your links:</h2>
420+
<FlexWrapper gap="var(--token-space-3)" justifycontent={width > 600 ? "flex-start" : "space-evenly"} direction="row" wrap="wrap">
421+
{#each $customLinks as link (link.id)}
422+
<a class="option" href={link.url} target="_blank">
423+
<FlexWrapper width="100%" height="100%" gap="var(--token-space-2)">
424+
<p class="option-text">{link.name}</p>
425+
<IconButton onClick={() => editLinkPrompt(link)} icon="edit" alt="edit"/>
426+
<IconButton onClick={() => remove_custom_link(link.id)} icon="delete" alt="delete"/>
427+
</FlexWrapper>
428+
</a>
429+
{/each}
430+
<!-- Button to add a new link -->
431+
<div class="option" onclick={addLinkPrompt}>
432+
<FlexWrapper width="100%" height="100%" justifycontent="center" alignitems="center">
433+
<Icon icon="add" size="5rem"/>
434+
</FlexWrapper>
435+
</div>
436+
</FlexWrapper>
436437
</FlexWrapper>
437-
</FlexWrapper>
438+
{/if}
438439

439440

440441
<style>

0 commit comments

Comments
 (0)