web fixes
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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: Mon–Sat, 9:00 AM – 6:00 PM</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user