diff options
| author | secondl1ght <[email protected]> | 2022-07-30 18:58:25 -0600 |
|---|---|---|
| committer | secondl1ght <[email protected]> | 2022-07-30 18:58:25 -0600 |
| commit | 2bca310acc4ca22960c5902b402c2ae23d0f7755 (patch) | |
| tree | 878ef51ca8a062dfe091919d5680e58937093979 /src/components/LandingHeader.svelte | |
| parent | 6ea99d042f50d2257a8d6abfd763ff4a328e3d38 (diff) | |
| download | coinos-ui-2bca310acc4ca22960c5902b402c2ae23d0f7755.tar.gz coinos-ui-2bca310acc4ca22960c5902b402c2ae23d0f7755.zip | |
hook up all nav buttons, add dropdown menu, add routes...
Diffstat (limited to 'src/components/LandingHeader.svelte')
| -rw-r--r-- | src/components/LandingHeader.svelte | 28 |
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> |
