feat(SW-281): refactor type
This commit is contained in:
@@ -11,7 +11,7 @@ import { getIntl } from "@/i18n"
|
|||||||
|
|
||||||
import styles from "./hotelListing.module.css"
|
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({
|
export default async function HotelListing({
|
||||||
imageUrl,
|
imageUrl,
|
||||||
@@ -21,7 +21,7 @@ export default async function HotelListing({
|
|||||||
distanceToCentre,
|
distanceToCentre,
|
||||||
description,
|
description,
|
||||||
link,
|
link,
|
||||||
}: HotelListingProps) {
|
}: HotelListingItemProps) {
|
||||||
const intl = await getIntl()
|
const intl = await getIntl()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -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
|
|
||||||
}
|
|
||||||
9
types/components/contentPage/hotelListingItem.ts
Normal file
9
types/components/contentPage/hotelListingItem.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
export type HotelListingItemProps = {
|
||||||
|
imageUrl: string
|
||||||
|
altText: string
|
||||||
|
name: string
|
||||||
|
address: string
|
||||||
|
distanceToCentre: number
|
||||||
|
description: string
|
||||||
|
link: string
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user