From 72e8e7f1abe7e5ecf44e9b069754eaf6ef9d695e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matilda=20Landstr=C3=B6m?= Date: Tue, 11 Feb 2025 14:55:32 +0000 Subject: [PATCH] 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 --- .../RestaurantBar/RestaurantBarItem/index.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/components/ContentType/HotelPage/SidePeeks/RestaurantBar/RestaurantBarItem/index.tsx b/components/ContentType/HotelPage/SidePeeks/RestaurantBar/RestaurantBarItem/index.tsx index ddbcb70c7..5e175287d 100644 --- a/components/ContentType/HotelPage/SidePeeks/RestaurantBar/RestaurantBarItem/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/RestaurantBar/RestaurantBarItem/index.tsx @@ -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({ ) : null} + {/* If (restaurantPage && bookTableUrl && mainBody==empty), link to external restaurant page. */} {bookTableUrl || restaurantPage ? (
{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" })} ) : null} - {restaurantPage ? ( + {restaurantPage && mainBody?.length ? (