aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/LandingHeader.svelte
diff options
context:
space:
mode:
authorsecondl1ght <[email protected]>2022-07-30 18:58:25 -0600
committersecondl1ght <[email protected]>2022-07-30 18:58:25 -0600
commita172e63263654dbb8096859be16041d301afec77 (patch)
treed9347de658d7345c0224c88a68e5fc217ae32c9a /src/components/LandingHeader.svelte
parent76c2b1e362139508b5cc30c18492ce8785c58354 (diff)
downloadcoinos-ui-a172e63263654dbb8096859be16041d301afec77.tar.gz
coinos-ui-a172e63263654dbb8096859be16041d301afec77.zip
hook up all nav buttons, add dropdown menu, add routes...
Diffstat (limited to 'src/components/LandingHeader.svelte')
-rw-r--r--src/components/LandingHeader.svelte28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/components/LandingHeader.svelte b/src/components/LandingHeader.svelte
index 4da9a17e..927c8749 100644
--- a/src/components/LandingHeader.svelte
+++ b/src/components/LandingHeader.svelte
@@ -2,6 +2,7 @@
import { goto } from '$app/navigation';
import { scroll } from '$lib/utils';
import { Icon } from '$comp';
+ import { user } from '$lib/store';
export let howItWorks;
export let faq;
@@ -17,15 +18,24 @@
<button on:click={() => scroll(howItWorks)}>How It Works</button>
<button on:click={() => scroll(faq)}>FAQ</button>
<button>About</button>
- <button class="border rounded-full px-6 py-2 font-bold" on:click={() => goto('/register')}
- >Start in Seconds</button
- >
- <button
- class="bg-black text-white border rounded-full px-6 py-2 font-bold"
- on:click={() => goto('/login')}
- >
- Sign in
- </button>
+ {#if !$user}
+ <button class="border rounded-full px-6 py-2 font-bold" on:click={() => goto('/register')}
+ >Start in Seconds</button
+ >
+ <button
+ class="bg-black text-white border rounded-full px-6 py-2 font-bold"
+ on:click={() => goto('/login')}
+ >
+ Sign in
+ </button>
+ {:else}
+ <button
+ class="bg-black text-white border rounded-full px-6 py-2 font-bold"
+ on:click={() => goto('/logout')}
+ >
+ Sign out
+ </button>
+ {/if}
</div>
</nav>
</header>