Fix page refresh issue
Build and Push to Digital Ocean Container Registry / build-and-push (push) Successful in 2m36s
Build and Push to Digital Ocean Container Registry / migrate (push) Successful in 34s

This commit is contained in:
NeilClack
2026-09-11 16:05:43 -05:00
parent 64715c91d3
commit 051520b941
6 changed files with 17 additions and 8 deletions
@@ -1,4 +1,5 @@
<script lang="ts">
import { enhance } from '$app/forms';
import { clientFormatPhoneNumber } from '$lib/utils';
import type { PageProps } from './$types';
@@ -100,7 +101,7 @@
</div>
{/if}
<form method="POST" action="?/updateProfile" class="mt-5 flex flex-col gap-4">
<form method="POST" action="?/updateProfile" use:enhance class="mt-5 flex flex-col gap-4">
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
<div class="flex flex-col gap-1.5">
<label for="firstName" class="text-sm font-medium text-slate-700 dark:text-slate-300">
@@ -206,6 +207,7 @@
<form
method="POST"
action={editingAddressId ? '?/updateAddress' : '?/addAddress'}
use:enhance
class="mt-5 flex flex-col gap-4"
>
{#if editingAddressId}
@@ -314,8 +316,10 @@
<form
method="POST"
action="?/deleteAddress"
onsubmit={(event) => {
if (!confirm('Delete this address?')) event.preventDefault();
use:enhance={({ cancel }) => {
if (!confirm('Delete this address?')) {
cancel();
}
}}
>
<input type="hidden" name="id" value={address.id} />
@@ -11,6 +11,7 @@
-->
<script lang="ts">
import { enhance } from '$app/forms';
import Window from '$lib/components/containers/Window.svelte';
import { clientFormatPhoneNumber } from '$lib/utils';
import type { PageProps } from './$types';
@@ -42,7 +43,7 @@
</script>
<Window>
<form method="POST" class="flex flex-col items-center gap-5">
<form method="POST" use:enhance class="flex flex-col items-center gap-5">
<h1 class="text-center text-2xl font-bold text-slate-900 dark:text-slate-100">
Please finish setting up your profile
</h1>
+2 -1
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import { enhance } from '$app/forms';
import { resolve } from '$app/paths';
import type { PageProps } from './$types';
import Window from '$lib/components/containers/Window.svelte';
@@ -24,7 +25,7 @@
</div>
{/if}
<form method="POST" class="flex flex-col gap-4">
<form method="POST" use:enhance class="flex flex-col gap-4">
<h1 class="text-2xl font-bold text-slate-900 dark:text-slate-100">Forgot Password</h1>
<p class="text-sm text-slate-600 dark:text-slate-400">
Enter your email and we'll send you a link to reset your password.
+2 -1
View File
@@ -10,7 +10,8 @@
let verified = $derived(page.url.searchParams.get('verified') === 'true');
async function handleSubmit() {
async function handleSubmit(event: SubmitEvent) {
event.preventDefault();
const { error: authError } = await authClient.signIn.email({
email,
password,
+2 -1
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import { enhance } from '$app/forms';
import Window from '$lib/components/containers/Window.svelte';
import { authClient } from '$lib/auth-client';
import { resolve } from '$app/paths';
@@ -32,7 +33,7 @@
</div>
{/if}
<form method="POST" class="flex flex-col gap-4">
<form method="POST" use:enhance class="flex flex-col gap-4">
<h1 class="text-2xl font-bold text-slate-900 dark:text-slate-100">Create Account</h1>
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
+2 -1
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import { enhance } from '$app/forms';
import type { PageProps } from './$types';
import Window from '$lib/components/containers/Window.svelte';
@@ -15,7 +16,7 @@
</div>
{/if}
<form method="POST" class="flex flex-col gap-4">
<form method="POST" use:enhance class="flex flex-col gap-4">
<h1 class="text-2xl font-bold text-slate-900 dark:text-slate-100">
{data.invite ? 'Set Your Password' : 'Reset Password'}
</h1>