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}
|
className={styles.image}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
<Button
|
{images.length > 1 && (
|
||||||
theme="base"
|
<>
|
||||||
intent="inverted"
|
<Button
|
||||||
size="small"
|
theme="base"
|
||||||
onClick={() => setLightboxIsOpen(true)}
|
intent="inverted"
|
||||||
className={styles.seeAllButton}
|
size="small"
|
||||||
>
|
onClick={() => setLightboxIsOpen(true)}
|
||||||
{intl.formatMessage({ id: "See all photos" })}
|
className={styles.seeAllButton}
|
||||||
</Button>
|
>
|
||||||
<Lightbox
|
{intl.formatMessage({ id: "See all photos" })}
|
||||||
images={images}
|
</Button>
|
||||||
dialogTitle={intl.formatMessage(
|
<Lightbox
|
||||||
{ id: "Image gallery" },
|
images={images}
|
||||||
{ name: hotelName }
|
dialogTitle={intl.formatMessage(
|
||||||
)}
|
{ id: "Image gallery" },
|
||||||
isOpen={lightboxIsOpen}
|
{ name: hotelName }
|
||||||
onClose={() => setLightboxIsOpen(false)}
|
)}
|
||||||
/>
|
isOpen={lightboxIsOpen}
|
||||||
|
onClose={() => setLightboxIsOpen(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user