feat(SW-281): refactor type

This commit is contained in:
Fredrik Thorsson
2024-10-28 14:23:57 +01:00
parent 720dc4c26b
commit d8dacf022d
3 changed files with 11 additions and 13 deletions

View File

@@ -11,7 +11,7 @@ import { getIntl } from "@/i18n"
import styles from "./hotelListing.module.css"
import type { HotelListingProps } from "@/types/components/contentPage/hotelListing"
import type { HotelListingItemProps } from "@/types/components/contentPage/hotelListingItem"
export default async function HotelListing({
imageUrl,
@@ -21,7 +21,7 @@ export default async function HotelListing({
distanceToCentre,
description,
link,
}: HotelListingProps) {
}: HotelListingItemProps) {
const intl = await getIntl()
return (

View File

@@ -1,11 +0,0 @@
import type { Hotel } from "@/types/hotel"
export type HotelListingProps = {
imageUrl: Hotel["hotelContent"]["images"]["imageSizes"]["large"]
altText: Hotel["hotelContent"]["images"]["metaData"]["altText"]
name: Hotel["name"]
address: Hotel["address"]["streetAddress"]
distanceToCentre: Hotel["location"]["distanceToCentre"]
description: Hotel["hotelContent"]["texts"]["descriptions"]["medium"]
link: string
}

View File

@@ -0,0 +1,9 @@
export type HotelListingItemProps = {
imageUrl: string
altText: string
name: string
address: string
distanceToCentre: number
description: string
link: string
}