web fixes

This commit is contained in:
2026-04-15 00:38:04 -06:00
parent 7d3cc51c8f
commit 023fdf5ee9
6 changed files with 14 additions and 11 deletions

View File

@@ -425,12 +425,12 @@ const canBookAppointments = user?.role === "CUSTOMER" || user?.role === "ADMIN";
})
.then((r) => r.json())
.then(setStores)
.catch(() => {});
.catch(() => setError("Failed to load stores."));
fetch(`${API_BASE}/api/v1/services?size=100`)
.then((r) => r.json())
.then((data) => setServices(data.content ?? []))
.catch(() => {});
.catch(() => setError("Failed to load services."));
fetch(`${API_BASE}/api/v1/pets?size=200&sort=id,asc&status=Available`)
.then((r) => r.json())

View File

@@ -43,6 +43,9 @@ function PaymentForm({ clientSecret, totalAmount, onSuccess, onCancel }) {
try {
await apiCompleteCheckout(token, paymentIntentId);
} catch {
setPayError("Order confirmation failed. Please contact support.");
setPaying(false);
return;
}
onSuccess();
}

View File

@@ -57,7 +57,7 @@ function ChatPage() {
}
catch {
//Silent fail
setError("Failed to load messages.");
}
}, [token]);
@@ -139,7 +139,7 @@ function ChatPage() {
if (open) convId = open.id;
}
} catch {
//
setError("Failed to load conversations.");
}
}

View File

@@ -30,8 +30,8 @@ export default function ContactPage() {
<section className="info-content">
<div className="info-card">
<h2>General Contact</h2>
<p>Email: support@petshop.com</p>
<p>Phone: (000) 000-0000</p>
<p>Email: hello@leonspetstore.com.au</p>
<p>Phone: (03) 9000 0000</p>
<p>Hours: MonSat, 9:00 AM 6:00 PM</p>
</div>

View File

@@ -135,6 +135,8 @@ function RegisterPage() {
value={form.phone}
onChange={handleChange}
required
pattern="[0-9\-\+\(\) ]{7,15}"
title="Enter a valid phone number"
/>
</label>
@@ -161,6 +163,7 @@ function RegisterPage() {
value={form.confirmPassword}
onChange={handleChange}
required
minLength={6}
autoComplete="new-password"
/>
</label>