From b19dbf0664a3f960ee4a18a3e607da78b63019d0 Mon Sep 17 00:00:00 2001 From: Chuma McPhoy Date: Mon, 12 Aug 2024 13:51:05 +0200 Subject: [PATCH] refactor(feat-SW-94): use enum for HotelHashValues and move to types/components dir --- .../HotelPage/TabNavigation/index.tsx | 21 ++++++++++--------- .../HotelPage/TabNavigation/types.ts | 8 ------- types/components/hotelPage/tabNavigation.ts | 9 ++++++++ 3 files changed, 20 insertions(+), 18 deletions(-) delete mode 100644 components/ContentType/HotelPage/TabNavigation/types.ts create mode 100644 types/components/hotelPage/tabNavigation.ts diff --git a/components/ContentType/HotelPage/TabNavigation/index.tsx b/components/ContentType/HotelPage/TabNavigation/index.tsx index af158636e..453894b0f 100644 --- a/components/ContentType/HotelPage/TabNavigation/index.tsx +++ b/components/ContentType/HotelPage/TabNavigation/index.tsx @@ -4,27 +4,28 @@ import { useIntl } from "react-intl" import Link from "@/components/TempDesignSystem/Link" import useHash from "@/hooks/useHash" -import { HotelHashValues } from "./types" - import styles from "./tabNavigation.module.css" +import { HotelHashValues } from "@/types/components/hotelPage/tabNavigation" + export default function TabNavigation() { const hash = useHash() const { formatMessage } = useIntl() const hotelTabLinks: { href: HotelHashValues; text: string }[] = [ - { href: "#overview", text: "Overview" }, - { href: "#rooms-section", text: "Rooms" }, - { href: "#restaurant-and-bar", text: "Restaurant & Bar" }, - { href: "#meetings-and-conferences", text: "Meetings & Conferences" }, - { href: "#wellness-and-exercise", text: "Wellness & Exercise" }, - { href: "#activities", text: "Activities" }, - { href: "#faq", text: "FAQ" }, + { href: HotelHashValues.overview, text: "Overview" }, + { href: HotelHashValues.rooms, text: "Rooms" }, + { href: HotelHashValues.restaurant, text: "Restaurant & Bar" }, + { href: HotelHashValues.meetings, text: "Meetings & Conferences" }, + { href: HotelHashValues.wellness, text: "Wellness & Exercise" }, + { href: HotelHashValues.activities, text: "Activities" }, + { href: HotelHashValues.faq, text: "FAQ" }, ] return (