Merged in fix/linting (pull request #2708)
Fix/linting * fix import issues and add lint check no-extraneous-dependencies * fix use type HotelType instead of string Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -16,6 +16,8 @@ import { trackMapClick } from "@/utils/tracking/destinationPage"
|
||||
|
||||
import HotelMapCard from "../../../HotelMapCard"
|
||||
|
||||
import type { HotelType } from "@scandic-hotels/common/constants/hotelType"
|
||||
|
||||
import type { MarkerProperties } from "@/types/components/maps/destinationMarkers"
|
||||
|
||||
interface MarkerProps {
|
||||
@@ -60,7 +62,7 @@ export default function Marker({ position, properties }: MarkerProps) {
|
||||
<HotelMarkerByType
|
||||
size={isHovered || isActive ? "large" : "small"}
|
||||
hotelId={properties.id}
|
||||
hotelType={properties.type}
|
||||
hotelType={properties.type as HotelType}
|
||||
/>
|
||||
|
||||
{isActive && isDesktop && (
|
||||
|
||||
@@ -24,8 +24,8 @@ import Sidebar from "./Sidebar"
|
||||
|
||||
import styles from "./hotelMapPage.module.css"
|
||||
|
||||
import type { MarkerInfo } from "@scandic-hotels/design-system/Map/types"
|
||||
import type { PointOfInterest } from "@scandic-hotels/trpc/types/hotel"
|
||||
import type { MarkerInfo } from "@scandic-hotels/trpc/types/marker"
|
||||
|
||||
import type { Coordinates } from "@/types/components/maps/coordinates"
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import HotelMapPageClient from "./Client"
|
||||
|
||||
import type { HotelType } from "@scandic-hotels/common/constants/hotelType"
|
||||
|
||||
interface HotelMapPageProps {
|
||||
hotelId: string
|
||||
}
|
||||
@@ -35,7 +37,7 @@ export default async function HotelMapPage({ hotelId }: HotelMapPageProps) {
|
||||
apiKey={env.GOOGLE_STATIC_MAP_KEY}
|
||||
mapId={env.GOOGLE_DYNAMIC_MAP_ID}
|
||||
hotelName={name}
|
||||
markerInfo={{ hotelId, hotelType }}
|
||||
markerInfo={{ hotelId, hotelType: hotelType as HotelType }} // TODO: Update attributes schema instead
|
||||
coordinates={coordinates}
|
||||
pointsOfInterest={pointsOfInterest}
|
||||
/>
|
||||
|
||||
@@ -51,6 +51,8 @@ import {
|
||||
|
||||
import styles from "./hotelPage.module.css"
|
||||
|
||||
import type { HotelType } from "@scandic-hotels/common/constants/hotelType"
|
||||
|
||||
import type { HotelPageProps } from "@/types/components/hotelPage/hotelPage"
|
||||
import { AlertName } from "@/types/enums/alert"
|
||||
import { HotelHashValues } from "@/types/enums/hotelPage"
|
||||
@@ -242,7 +244,7 @@ export default async function HotelPage({ hotelId }: HotelPageProps) {
|
||||
<StaticMap
|
||||
coordinates={coordinates}
|
||||
hotelName={name}
|
||||
markerInfo={{ hotelType, hotelId }}
|
||||
markerInfo={{ hotelType: hotelType as HotelType, hotelId }} // TODO: Update hotel attributes schema instead
|
||||
/>
|
||||
</Link>
|
||||
<MapCard
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { MarkerInfo } from "@scandic-hotels/trpc/types/marker"
|
||||
import type { MarkerInfo } from "@scandic-hotels/design-system/Map/types"
|
||||
|
||||
import type { Coordinates } from "../../maps/coordinates"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user