aboutsummaryrefslogtreecommitdiffstats
path: root/code/frontend/src/routes/(main)/(public)/portal/+page.svelte
blob: cc16681e014701fec73fcc85c7e06f34c6cbfbdd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<script lang="ts">
    import { onMount } from "svelte";
    import type { PageData } from "./$types";
    import type { PortalMessage } from "$configuration";
    import { goto } from "$app/navigation";
    import { sgs } from "$utils/global-state";

    export let data: PageData;

    onMount(async () => {
        switch (data.message as PortalMessage) {
            case "emailValidated": {
                sgs("showEmailValidatedAlertWhenLoggedIn", true);
                await goto("/home");
                break;
            }
            default: {
                await goto("/home");
            }
        }
    });
</script>

<div class="p-3">
    <h1>Warping...</h1>
</div>