-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
81 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,27 @@ | ||
<script lang="ts"> | ||
import { user } from "$lib/stores/user.svelte.ts" | ||
import H1 from "$lib/components/typography/H1.svelte" | ||
import { ContributorState } from "$lib/stores/state.svelte.ts" | ||
import Ceremony from "$lib/components/Ceremony.svelte" | ||
import Join from "$lib/components/Join.svelte" | ||
import {user} from "$lib/stores/user.svelte.ts" | ||
import H1 from "$lib/components/typography/H1.svelte" | ||
import {ContributorState} from "$lib/stores/state.svelte.ts" | ||
import Ceremony from "$lib/components/Ceremony.svelte" | ||
import Join from "$lib/components/Join.svelte" | ||
let contributor: ContributorState = new ContributorState() | ||
let contributor: ContributorState = new ContributorState() | ||
$effect(() => { | ||
const userId = user.session?.user.id | ||
if (userId) contributor.setUserId(userId) | ||
}) | ||
$effect(() => { | ||
const userId = user.session?.user.id | ||
if (userId) contributor.setUserId(userId) | ||
}) | ||
</script> | ||
|
||
<!--Todo handle when to not show ceremony component--> | ||
|
||
{#if contributor} | ||
{#if contributor.loggedIn} | ||
{#if contributor.loggedIn} | ||
{#if contributor.allowanceState === "invited"} | ||
<Ceremony {contributor}/> | ||
|
||
{:else if contributor.onWaitlist} | ||
{:else if contributor.allowanceState === "waitingList"} | ||
<H1>Your on the list</H1> | ||
{:else} | ||
|
||
<!--Do this if no code and no waitlist?--> | ||
<Join /> | ||
<Join/> | ||
{/if} | ||
{:else} | ||
<H1>Welcome to union ceremony</H1> | ||
{/if} | ||
|