fix(SW.1240): hide see all photos if only one image
This commit is contained in:
@@ -32,24 +32,28 @@ export default function PreviewImages({
|
||||
className={styles.image}
|
||||
/>
|
||||
))}
|
||||
<Button
|
||||
theme="base"
|
||||
intent="inverted"
|
||||
size="small"
|
||||
onClick={() => setLightboxIsOpen(true)}
|
||||
className={styles.seeAllButton}
|
||||
>
|
||||
{intl.formatMessage({ id: "See all photos" })}
|
||||
</Button>
|
||||
<Lightbox
|
||||
images={images}
|
||||
dialogTitle={intl.formatMessage(
|
||||
{ id: "Image gallery" },
|
||||
{ name: hotelName }
|
||||
)}
|
||||
isOpen={lightboxIsOpen}
|
||||
onClose={() => setLightboxIsOpen(false)}
|
||||
/>
|
||||
{images.length > 1 && (
|
||||
<>
|
||||
<Button
|
||||
theme="base"
|
||||
intent="inverted"
|
||||
size="small"
|
||||
onClick={() => setLightboxIsOpen(true)}
|
||||
className={styles.seeAllButton}
|
||||
>
|
||||
{intl.formatMessage({ id: "See all photos" })}
|
||||
</Button>
|
||||
<Lightbox
|
||||
images={images}
|
||||
dialogTitle={intl.formatMessage(
|
||||
{ id: "Image gallery" },
|
||||
{ name: hotelName }
|
||||
)}
|
||||
isOpen={lightboxIsOpen}
|
||||
onClose={() => setLightboxIsOpen(false)}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user