Small corrections
This commit is contained in:
@@ -159,11 +159,7 @@ export default function AdoptPage() {
|
||||
{loading && <p className="adopt-status-msg">Loading pets...</p>}
|
||||
|
||||
{error && (
|
||||
<div className="adopt-error-box">
|
||||
<p className="adopt-error-title">Failed to load pets</p>
|
||||
<code className="adopt-error-detail">{error}</code>
|
||||
<p className="adopt-error-hint">Make sure the backend is running and try again.</p>
|
||||
</div>
|
||||
<p className="adopt-status-msg">Unable to load pets, please try again later.</p>
|
||||
)}
|
||||
|
||||
{!loading && !error && displayedPets.length === 0 && (
|
||||
|
||||
@@ -28,11 +28,11 @@ export default function ContactPage() {
|
||||
const params = new URLSearchParams({ page: "0", size: "100", sort: "storeName,asc" });
|
||||
fetch(`/api/v1/stores?${params}`)
|
||||
.then((res) => {
|
||||
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
||||
if (!res.ok) throw new Error("Unable to load store, please try again later.");
|
||||
return res.json();
|
||||
})
|
||||
.then((data) => setLocations(data.content ?? []))
|
||||
.catch((err) => setError(err.message))
|
||||
.catch(() => setError("Unable to load store, please try again later."))
|
||||
.finally(() => setLoading(false));
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -80,10 +80,7 @@ export default function ProductsPage() {
|
||||
{loading && <p className="adopt-status-msg">Loading products...</p>}
|
||||
|
||||
{error && (
|
||||
<div className="adopt-error-box">
|
||||
<p className="adopt-error-title">Failed to load products</p>
|
||||
<code className="adopt-error-detail">{error}</code>
|
||||
</div>
|
||||
<p className="adopt-status-msg">Unable to load products, please try again later.</p>
|
||||
)}
|
||||
|
||||
{!loading && !error && products.length === 0 && (
|
||||
|
||||
Reference in New Issue
Block a user