From 9186c0cbd1dd447220f4f12cc2a0f242f350e5a1 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Fri, 8 Nov 2024 12:35:33 +0100 Subject: [PATCH] feat(SW-340) Moved types to types folder --- components/Maps/InteractiveMap/HotelMapContent/index.tsx | 9 ++------- types/hotel.ts | 7 +++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/components/Maps/InteractiveMap/HotelMapContent/index.tsx b/components/Maps/InteractiveMap/HotelMapContent/index.tsx index d91d4e039..04c796c2c 100644 --- a/components/Maps/InteractiveMap/HotelMapContent/index.tsx +++ b/components/Maps/InteractiveMap/HotelMapContent/index.tsx @@ -11,19 +11,14 @@ import ScandicMarker from "../../Markers/Scandic" import styles from "./hotelMapContent.module.css" -import type { PointOfInterest } from "@/types/hotel" +import type { HotelMapContentProps } from "@/types/hotel" export default function HotelMapContent({ coordinates, pointsOfInterest, onActivePoiChange, activePoi, -}: { - coordinates: { lat: number; lng: number } - pointsOfInterest: PointOfInterest[] - onActivePoiChange?: (poiName: string | null) => void - activePoi?: string | null -}) { +}: HotelMapContentProps) { function toggleActivePoi(poiName: string) { onActivePoiChange?.(activePoi === poiName ? null : poiName) } diff --git a/types/hotel.ts b/types/hotel.ts index 9c95a9067..5052caded 100644 --- a/types/hotel.ts +++ b/types/hotel.ts @@ -57,3 +57,10 @@ export enum PointOfInterestGroupEnum { export type ParkingData = z.infer export type Facility = z.infer & { id: string } + +export type HotelMapContentProps = { + coordinates: { lat: number; lng: number } + pointsOfInterest: PointOfInterest[] + onActivePoiChange?: (poiName: string | null) => void + activePoi?: string | null +}