Skip to content

Commit

Permalink
Merge branch 'main' into DAH-1907-remove-form-scroll-bars
Browse files Browse the repository at this point in the history
  • Loading branch information
tallulahkay authored Dec 21, 2023
2 parents 24a78fc + 52617c7 commit 65b9346
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 59 deletions.
8 changes: 0 additions & 8 deletions app/assets/json/housing_counselors.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
"phone": "(800) 777-7526",
"website": "https://www.balancepro.org"
},
{
"name": "Bayview Hunters Point Multipurpose Senior Services",
"languages": ["English", "Cantonese"],
"address": "1753 Carroll Avenue",
"citystate": "San Francisco, CA 94124",
"phone": "(415) 822-1444",
"website": "https://bhpmss.org/"
},
{
"name": "Bill Sorro Housing Program (BiSHoP)",
"languages":["English", "Spanish", "Arabic"],
Expand Down
17 changes: 0 additions & 17 deletions app/assets/json/housing_counselors_react.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,6 @@
"email": "[email protected]",
"phone": "(415) 865–5555"
},
{
"fullName": "Bayview Hunters Point Multi-Purpose Senior Center (BHPMSS)",
"shortName": "BHPMSS",
"services": [
"rental",
"seniorOnly"
],
"languages": [
"cantonese",
"english"
],
"address": "1753 Carroll Ave",
"cityState": "San Francisco, CA 94124",
"website": "https://bhpmss.org/",
"email": "[email protected]",
"phone": "(415) 822-1444"
},
{
"fullName": "Bill Sorro Housing Program (BiSHoP)",
"shortName": "BiSHoP",
Expand Down
48 changes: 14 additions & 34 deletions app/javascript/modules/listingDetails/ListingDetailsImageCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,20 @@ const createImageCardProps = (listing: RailsListing) => {
}
})

// We want to support both the imageURL and listing images fields for now
// but the hope is to ultimately deprecate that field.
// If we have to use the fallback image then we want to disable the image
// field from A11Y tools since at that point it is purely decorative.
if (!listingImages) {
return listing?.imageURL
? {
props: {
imageUrl: listing.imageURL,
description: t("listings.buildingImageAltText"),
},
}
: {
props: {
imageUrl: fallbackImg,
description: "",
},
}
} else {
return listingImages.length > 0
? {
props: {
images: listingImages,
description: t("listings.buildingImageAltText"),
moreImagesLabel: t("listings.morePhotos"),
},
}
: {
props: {
imageUrl: fallbackImg,
description: "",
},
}
}
return listingImages && listingImages.length > 0
? {
props: {
images: listingImages,
description: t("listings.buildingImageAltText"),
moreImagesLabel: t("listings.morePhotos"),
},
}
: {
props: {
imageUrl: fallbackImg,
description: "",
},
}
}

export const ListingDetailsImageCard = ({ listing }: ListingDetailsImageCardProps) => {
Expand Down

0 comments on commit 65b9346

Please sign in to comment.