Skip to content

Commit

Permalink
Merge pull request #38 from aws-geospatial/ALS-1837_updated-place-popup
Browse files Browse the repository at this point in the history
[ALS-1837] Updated place popup
  • Loading branch information
mbalfour-amzn authored Nov 6, 2024
2 parents 0feed37 + 8fe1583 commit cd3f4cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/atomicui/molecules/Popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ const Popup: FC<PopupProps> = ({ placeId, position, label, active, select, onClo
]);

const renderPlaceInfo = useMemo(() => {
const openingHours = placeData?.OpeningHours?.map(oh => oh.Display);
const areOpeningHoursPresent = openingHours && openingHours.every(oh => oh !== undefined);
const openingHours: string[] = [];
placeData?.OpeningHours?.forEach(oh => oh.Display?.forEach(d => openingHours.push(d)));
const areOpeningHoursPresent = openingHours.length > 0 && openingHours.every(oh => oh !== undefined);
const websites = placeData?.Contacts?.Websites?.map(w => w.Value);
const areWebsitesPresent = websites && websites.every(w => w !== undefined);
const phones = placeData?.Contacts?.Phones?.map(p => p.Value);
Expand Down

0 comments on commit cd3f4cc

Please sign in to comment.