delete confirmation page and also a normal profile
This commit is contained in:
parent
55b3796bee
commit
7bdd3ec871
27
src/routes/profile/+page.svelte
Normal file
27
src/routes/profile/+page.svelte
Normal 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>
|
9
src/routes/profile/delete-confirmation/+page.svelte
Normal file
9
src/routes/profile/delete-confirmation/+page.svelte
Normal 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>
|
Loading…
Reference in a new issue