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:
+4
-4
@@ -1,8 +1,8 @@
|
||||
import { useIntl } from 'react-intl'
|
||||
|
||||
import { formatPrice } from '@scandic-hotels/common/utils/numberFormatting'
|
||||
import { MaterialIcon } from '@scandic-hotels/design-system/Icons/MaterialIcon'
|
||||
import { Typography } from '@scandic-hotels/design-system/Typography'
|
||||
import { MaterialIcon } from '../../../../Icons/MaterialIcon'
|
||||
import { Typography } from '../../../../Typography'
|
||||
|
||||
import HotelMarker from '../../../Markers/HotelMarker'
|
||||
|
||||
@@ -15,7 +15,7 @@ interface HotelPinProps {
|
||||
hotelAdditionalPrice?: number
|
||||
hotelAdditionalCurrency?: string
|
||||
}
|
||||
|
||||
const NOT_AVAILABLE = '-'
|
||||
export function HotelPin({
|
||||
isActive,
|
||||
hotelPrice,
|
||||
@@ -45,7 +45,7 @@ export function HotelPin({
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p>
|
||||
{isNotAvailable
|
||||
? '—'
|
||||
? NOT_AVAILABLE
|
||||
: formatPrice(
|
||||
intl,
|
||||
hotelPrice,
|
||||
|
||||
@@ -4,15 +4,13 @@ import {
|
||||
} from '@vis.gl/react-google-maps'
|
||||
import { useIntl } from 'react-intl'
|
||||
|
||||
import { Typography } from '@scandic-hotels/design-system/Typography'
|
||||
import { Typography } from '../../../Typography'
|
||||
|
||||
import { HotelMarkerByType } from '../../Markers/HotelMarkerByType'
|
||||
import { PoiMarker } from '../../Markers/PoiMarker'
|
||||
|
||||
import styles from './poiMapMarkers.module.css'
|
||||
|
||||
import type { PointOfInterest } from '@scandic-hotels/trpc/types/hotel'
|
||||
import type { MarkerInfo } from '@scandic-hotels/trpc/types/marker'
|
||||
import { MarkerInfo, PointOfInterest } from '../../types'
|
||||
|
||||
export type PoiMapMarkersProps = {
|
||||
activePoi?: string | null
|
||||
|
||||
@@ -4,8 +4,8 @@ import { Map, type MapProps, useMap } from '@vis.gl/react-google-maps'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useIntl } from 'react-intl'
|
||||
|
||||
import { IconButton } from '@scandic-hotels/design-system/IconButton'
|
||||
import { MaterialIcon } from '@scandic-hotels/design-system/Icons/MaterialIcon'
|
||||
import { IconButton } from '../../IconButton'
|
||||
import { MaterialIcon } from '../../Icons/MaterialIcon'
|
||||
|
||||
import {
|
||||
DEFAULT_ZOOM,
|
||||
@@ -21,9 +21,7 @@ import PoiMapMarkers from './PoiMapMarkers'
|
||||
|
||||
import styles from './interactiveMap.module.css'
|
||||
|
||||
import type { PointOfInterest } from '@scandic-hotels/trpc/types/hotel'
|
||||
import type { MarkerInfo } from '@scandic-hotels/trpc/types/marker'
|
||||
import { HotelPin } from '../types'
|
||||
import { HotelPin, MarkerInfo, PointOfInterest } from '../types'
|
||||
import { Lang } from '@scandic-hotels/common/constants/language'
|
||||
|
||||
export type InteractiveMapProps = {
|
||||
@@ -32,7 +30,7 @@ export type InteractiveMapProps = {
|
||||
lat: number
|
||||
lng: number
|
||||
}
|
||||
activePoi?: PointOfInterest['name'] | null
|
||||
activePoi?: string | null
|
||||
hotelPins?: HotelPin[]
|
||||
pointsOfInterest?: PointOfInterest[]
|
||||
markerInfo?: MarkerInfo
|
||||
@@ -44,7 +42,7 @@ export type InteractiveMapProps = {
|
||||
|
||||
isUserLoggedIn: boolean
|
||||
onTilesLoaded?: () => void
|
||||
onActivePoiChange?: (poi: PointOfInterest['name'] | null) => void
|
||||
onActivePoiChange?: (poi: string | null) => void
|
||||
|
||||
onClickHotel?: (hotelId: string) => void
|
||||
|
||||
|
||||
Reference in New Issue
Block a user