feat(SW-750): refactor types

This commit is contained in:
Fredrik Thorsson
2024-11-18 13:43:34 +01:00
parent 9344db7876
commit fc27339aff
3 changed files with 9 additions and 15 deletions

View File

@@ -13,7 +13,7 @@ import styles from "./contactInformation.module.css"
import type { ContactInformationProps } from "@/types/components/hotelPage/sidepeek/contactInformation"
export default async function ContactInformation({
adress,
hotelAdress,
coordinates,
contact,
socials,
@@ -31,8 +31,8 @@ export default async function ContactInformation({
<Body textTransform="bold">
{intl.formatMessage({ id: "Address" })}
</Body>
<Body color="uiTextHighContrast">{adress.streetAddress}</Body>
<Body color="uiTextHighContrast">{adress.city}</Body>
<Body color="uiTextHighContrast">{hotelAdress.streetAddress}</Body>
<Body color="uiTextHighContrast">{hotelAdress.city}</Body>
</div>
<div className={styles.drivingDirections}>
<Body textTransform="bold">

View File

@@ -33,7 +33,7 @@ export default async function AboutTheHotelSidePeek({
>
<section className={styles.wrapper}>
<ContactInformation
adress={hotelAdress}
hotelAdress={hotelAdress}
coordinates={coordinates}
contact={contact}
socials={socials}

View File

@@ -1,12 +1,6 @@
import type { Hotel, HotelAddress } from "@/types/hotel"
import type { AboutTheHotelSidePeekProps } from "./aboutTheHotel"
export type ContactInformationProps = {
adress: HotelAddress
coordinates: {
lat: number
lng: number
}
contact: Hotel["contactInformation"]
socials: Hotel["socialMedia"]
ecoLabels: Hotel["hotelFacts"]["ecoLabels"]
}
export type ContactInformationProps = Omit<
AboutTheHotelSidePeekProps,
"descriptions"
>