delete confirmation page and also a normal profile

This commit is contained in:
Erin 2023-11-12 17:57:06 -05:00
parent 55b3796bee
commit 7bdd3ec871
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,27 @@
<script lang="ts">
import type {PageData} from './$types';
export let data: PageData;
// TODO what the fuck else are you supposed to do about this. we redirect
// away from this page any time data.user is null but i dont have a better
// way to assert that it cant be null here
$: user = data.user as Exclude<typeof data['user'], null>
</script>
<h1>this is your profile</h1>
<p>are you dissatisfied with your portrayal?</p>
<form method="POST" action="/profile?/update">
<p>
<label for="name">your name:</label>
<input type="text" name="name" id="name" value={user.name}>
</p>
<p>
<button>set the record straight</button>
</p>
</form>
<p>
<a href="/profile/delete-confirmation">to the void</a>
</p>

View file

@ -0,0 +1,9 @@
<h1>the void</h1>
<p>do you really wish to delete your account?</p>
<form method="POST" action="/profile?/delete">
<p><button>return to digital dust</button></p>
</form>
<p><a href="/profile">no, i changed my mind</a></p>