Add user first and last name fields to signup form

This commit is contained in:
Sean Morley
2024-04-03 22:59:05 +00:00
parent 372db59211
commit ba6a5283fe
12 changed files with 273 additions and 10 deletions

View File

@@ -1,4 +1,8 @@
<script lang="ts">
import { enhance } from "$app/forms";
import type { PageData } from "./$types";
export let data: PageData;
import { goto } from "$app/navigation";
import campingDrawing from "$lib/assets/camping.svg";
import { visitCount } from "$lib/utils/stores/visitCountStore";
@@ -10,6 +14,9 @@
<div class="flex flex-col items-center justify-center">
<article class="prose">
{#if data.user && data.user.username != ""}
<h1 class="mb-4">Welcome {data.user.first_name}. Let's get Exploring!</h1>
{/if}
<h1 class="mb-4">Welcome. Let's get Exploring!</h1>
</article>
<img src={campingDrawing} class="w-1/4 mb-4" alt="Logo" />
@@ -23,3 +30,9 @@
</div>
</div>
</div>
{#if data.user}
<form method="post" use:enhance>
<button>Sign out</button>
</form>
{/if}