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

View File

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

View File

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