|
6 | 6 | Icon, |
7 | 7 | LinkButton, |
8 | 8 | IconButton, |
9 | | - Icon, |
10 | 9 | Space, |
11 | 10 | getSessionInfo, |
12 | 11 | refreshAccessToken, |
|
415 | 414 |
|
416 | 415 | <Space height="var(--token-space-4)" /> |
417 | 416 |
|
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> |
436 | 437 | </FlexWrapper> |
437 | | -</FlexWrapper> |
| 438 | +{/if} |
438 | 439 |
|
439 | 440 |
|
440 | 441 | <style> |
|
0 commit comments