Merged in fix/tripadvisor-rating (pull request #2193)
fix(SW-2892): don't show Tripadvisor rating if undefined * fix: don't show rating if undefined Approved-by: Bianca Widstam Approved-by: Christian Andolf Approved-by: Erik Tiekstra
This commit is contained in:
@@ -12,7 +12,7 @@ import type { HotelCardDialogImageProps } from "@/types/components/hotelReservat
|
||||
export default function HotelCardDialogImage({
|
||||
firstImage,
|
||||
altText,
|
||||
ratings,
|
||||
rating,
|
||||
imageError,
|
||||
setImageError,
|
||||
position,
|
||||
@@ -31,12 +31,14 @@ export default function HotelCardDialogImage({
|
||||
onError={() => setImageError(true)}
|
||||
/>
|
||||
)}
|
||||
<div className={styles.tripAdvisor}>
|
||||
<Chip className={styles.tripAdvisor}>
|
||||
<TripadvisorIcon color="Icon/Interactive/Default" />
|
||||
{ratings}
|
||||
</Chip>
|
||||
</div>
|
||||
{rating ? (
|
||||
<div className={styles.tripAdvisor}>
|
||||
<Chip className={styles.tripAdvisor}>
|
||||
<TripadvisorIcon color="Icon/Interactive/Default" />
|
||||
{rating}
|
||||
</Chip>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export default function ListingHotelCardDialog({
|
||||
<HotelCardDialogImage
|
||||
firstImage={firstImage}
|
||||
altText={altText}
|
||||
ratings={ratings || 0}
|
||||
rating={ratings}
|
||||
imageError={imageError}
|
||||
setImageError={setImageError}
|
||||
position="top"
|
||||
|
||||
@@ -61,7 +61,7 @@ export default function StandaloneHotelCardDialog({
|
||||
<HotelCardDialogImage
|
||||
firstImage={firstImage}
|
||||
altText={altText}
|
||||
ratings={ratings || 0}
|
||||
rating={ratings}
|
||||
imageError={imageError}
|
||||
setImageError={setImageError}
|
||||
position="left"
|
||||
|
||||
Reference in New Issue
Block a user