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:
Joakim Jäderberg
2025-08-27 09:22:37 +00:00
parent 67bdf5bbcf
commit 80c3327419
55 changed files with 250 additions and 135 deletions

View File

@@ -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 && (

View File

@@ -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"

View File

@@ -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}
/>

View File

@@ -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

View File

@@ -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"