web issue fixes

This commit is contained in:
2026-04-15 00:44:07 -06:00
parent 023fdf5ee9
commit 2e13c0cea0
4 changed files with 25 additions and 10 deletions

View File

@@ -2,6 +2,15 @@
import { useState, useEffect } from "react";
function getStoreImage(store) {
if (store.imageUrl) return store.imageUrl;
const name = store.storeName?.toLowerCase() ?? "";
if (name.includes("downtown")) return "/stores/downtown.webp";
if (name.includes("north")) return "/stores/north.webp";
if (name.includes("west")) return "/stores/west.webp";
return "/images/pet-placeholder.png";
}
export default function ContactPage() {
const [locations, setLocations] = useState([]);
const [loading, setLoading] = useState(true);
@@ -52,7 +61,7 @@ export default function ContactPage() {
<article key={location.storeId} className="info-mini-card location-card">
<div className="location-card-image-wrapper">
<img
src={location.imageUrl || "/images/pet-placeholder.png"}
src={getStoreImage(location)}
alt={location.storeName}
className="location-card-image"
onError={(e) => {