Merged in feat/SW-1296-external-restaurant-page (pull request #1306)
Feat(SW-1296): External restaurant page Approved-by: Erik Tiekstra Approved-by: Fredrik Thorsson
This commit is contained in:
@@ -15,8 +15,15 @@ export default async function RestaurantBarItem({
|
||||
restaurant,
|
||||
}: RestaurantBarItemProps) {
|
||||
const intl = await getIntl()
|
||||
const { bookTableUrl, name, openingDetails, content, menus, restaurantPage } =
|
||||
restaurant
|
||||
const {
|
||||
bookTableUrl,
|
||||
name,
|
||||
openingDetails,
|
||||
content,
|
||||
menus,
|
||||
restaurantPage,
|
||||
mainBody,
|
||||
} = restaurant
|
||||
const { images } = restaurant.content
|
||||
const visibleImages = restaurant.content.images.slice(0, 2)
|
||||
const imageWidth = images.length === 2 ? 240 : 496
|
||||
@@ -80,6 +87,7 @@ export default async function RestaurantBarItem({
|
||||
</ul>
|
||||
</div>
|
||||
) : null}
|
||||
{/* If (restaurantPage && bookTableUrl && mainBody==empty), link to external restaurant page. */}
|
||||
{bookTableUrl || restaurantPage ? (
|
||||
<div className={styles.ctaWrapper}>
|
||||
{bookTableUrl ? (
|
||||
@@ -92,10 +100,12 @@ export default async function RestaurantBarItem({
|
||||
trackingId="book a table"
|
||||
trackingParams={{ restaurantName: name }}
|
||||
>
|
||||
{intl.formatMessage({ id: "Book a table online" })}
|
||||
{restaurantPage && !mainBody?.length
|
||||
? intl.formatMessage({ id: "Read more & book a table" })
|
||||
: intl.formatMessage({ id: "Book a table online" })}
|
||||
</ButtonLink>
|
||||
) : null}
|
||||
{restaurantPage ? (
|
||||
{restaurantPage && mainBody?.length ? (
|
||||
<ButtonLink
|
||||
fullWidth
|
||||
theme="base"
|
||||
|
||||
Reference in New Issue
Block a user