Small corrections

This commit is contained in:
augmentedpotato
2026-04-15 06:39:41 -06:00
parent cdcc50e93a
commit 85653af39e
5 changed files with 21 additions and 16 deletions

View File

@@ -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));
}, []);