boredgame/src/routes/(app)/+page.svelte

41 lines
942 B
Svelte
Raw Normal View History

2022-01-28 05:27:12 +00:00
<script lang="ts">
export let data;
const { user, wishlists = [], collections = []} = data;
2022-01-28 05:27:12 +00:00
</script>
<div class="container">
{#if user}
<h1>Welcome, {user.username}!</h1>
<div>
<h2>You wishlists:</h2>
{#each wishlists as wishlist}
<a href="/wishlists/{wishlist.cuid}">{wishlist.name}</a>
{/each}
</div>
<div>
<h2>Your collections:</h2>
{#each collections as collection}
<a href="/collections/{collection.cuid}">{collection.name}</a>
{/each}
</div>
{:else}
<h1>Welcome to Bored Game!</h1>
<h2>Track the board games you own, the ones you want, and whether you play them enough.</h2>
<p>Get started by joining the <a href="/waitlist">wait list</a> or <a href="/login">log in</a> if you already have an account.</p>
{/if}
</div>
<style lang="postcss">
a {
text-decoration: underline;
}
.container {
2022-09-29 22:22:01 +00:00
display: grid;
place-content: center;
max-width: 900px;
gap: 0.25rem;
2022-09-29 22:22:01 +00:00
}
2022-01-28 05:27:12 +00:00
</style>