refactor(SW-302): cleanup

This commit is contained in:
Matilda Landström
2024-09-17 22:25:35 +02:00
parent 6c88d3431a
commit 2438d04f43
5 changed files with 24 additions and 29 deletions

View File

@@ -11,9 +11,7 @@ import {
type TabNavigationProps,
} from "@/types/components/hotelPage/tabNavigation"
export default function TabNavigation({
restaurantRefData,
}: TabNavigationProps) {
export default function TabNavigation({ restaurantTitle }: TabNavigationProps) {
const hash = useHash()
const intl = useIntl()
@@ -24,8 +22,8 @@ export default function TabNavigation({
},
{ href: HotelHashValues.rooms, text: intl.formatMessage({ id: "Rooms" }) },
{
href: "#" + restaurantRefData.href.en,
text: intl.formatMessage({ id: restaurantRefData.title }),
href: HotelHashValues.restaurant,
text: intl.formatMessage({ id: restaurantTitle }),
},
{
href: HotelHashValues.meetings,

View File

@@ -6,9 +6,8 @@ import SidePeekProvider from "@/components/SidePeekProvider"
import SidePeek from "@/components/TempDesignSystem/SidePeek"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
import {
getRestaurantDynamicTitles,
getRestaurantHeading,
setActivityCard,
setFacilityCards,
} from "@/utils/facilityCards"
@@ -70,7 +69,7 @@ export default async function HotelPage() {
<PreviewImages images={hotelImages} hotelName={hotelName} />
</div>
<TabNavigation
restaurantRefData={getRestaurantDynamicTitles(hotelDetailedFacilities)}
restaurantTitle={getRestaurantHeading(hotelDetailedFacilities)}
/>
<main className={styles.mainSection}>
<div className={styles.introContainer}>