feat(SW-340) Moved types to types folder
This commit is contained in:
@@ -11,19 +11,14 @@ import ScandicMarker from "../../Markers/Scandic"
|
|||||||
|
|
||||||
import styles from "./hotelMapContent.module.css"
|
import styles from "./hotelMapContent.module.css"
|
||||||
|
|
||||||
import type { PointOfInterest } from "@/types/hotel"
|
import type { HotelMapContentProps } from "@/types/hotel"
|
||||||
|
|
||||||
export default function HotelMapContent({
|
export default function HotelMapContent({
|
||||||
coordinates,
|
coordinates,
|
||||||
pointsOfInterest,
|
pointsOfInterest,
|
||||||
onActivePoiChange,
|
onActivePoiChange,
|
||||||
activePoi,
|
activePoi,
|
||||||
}: {
|
}: HotelMapContentProps) {
|
||||||
coordinates: { lat: number; lng: number }
|
|
||||||
pointsOfInterest: PointOfInterest[]
|
|
||||||
onActivePoiChange?: (poiName: string | null) => void
|
|
||||||
activePoi?: string | null
|
|
||||||
}) {
|
|
||||||
function toggleActivePoi(poiName: string) {
|
function toggleActivePoi(poiName: string) {
|
||||||
onActivePoiChange?.(activePoi === poiName ? null : poiName)
|
onActivePoiChange?.(activePoi === poiName ? null : poiName)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,3 +57,10 @@ export enum PointOfInterestGroupEnum {
|
|||||||
|
|
||||||
export type ParkingData = z.infer<typeof parkingSchema>
|
export type ParkingData = z.infer<typeof parkingSchema>
|
||||||
export type Facility = z.infer<typeof facilitySchema> & { id: string }
|
export type Facility = z.infer<typeof facilitySchema> & { id: string }
|
||||||
|
|
||||||
|
export type HotelMapContentProps = {
|
||||||
|
coordinates: { lat: number; lng: number }
|
||||||
|
pointsOfInterest: PointOfInterest[]
|
||||||
|
onActivePoiChange?: (poiName: string | null) => void
|
||||||
|
activePoi?: string | null
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user