Merged in feat/SW-1456-country-dynamic-map (pull request #1310)
feat(SW-1456): Added map and fetching hotels by country * feat(SW-1456): Added map and fetching hotels by country Approved-by: Fredrik Thorsson Approved-by: Matilda Landström
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
import DowntownCamperMarker from "./DowntownCamper"
|
||||
import DowntownCamperSmallMarker from "./DowntownCamperSmall"
|
||||
import GrandHotelMarker from "./GrandHotel"
|
||||
import GrandHotelSmallMarker from "./GrandHotelSmall"
|
||||
import HaymarketMarker from "./Haymarket"
|
||||
import HaymarketSmallMarker from "./HaymarketSmall"
|
||||
import HotelNorgeMarker from "./HotelNorge"
|
||||
import HotelNorgeSmallMarker from "./HotelNorgeSmall"
|
||||
import MarskiMarker from "./Marski"
|
||||
import MarskiSmallMarker from "./MarskiSmall"
|
||||
import ScandicMarker from "./Scandic"
|
||||
import ScandicGoMarker from "./ScandicGo"
|
||||
import ScandicGoSmallMarker from "./ScandicGoSmall"
|
||||
import ScandicSmallMarker from "./ScandicSmall"
|
||||
|
||||
import { HotelTypeEnum } from "@/types/enums/hotelType"
|
||||
import { SignatureHotelEnum } from "@/types/enums/signatureHotel"
|
||||
|
||||
interface HotelMarkerByTypeProps {
|
||||
hotelId: string
|
||||
hotelType: string
|
||||
smallSize?: boolean
|
||||
}
|
||||
|
||||
export default function HotelMarkerByType({
|
||||
hotelId,
|
||||
hotelType,
|
||||
smallSize = true,
|
||||
}: HotelMarkerByTypeProps) {
|
||||
if (hotelType === HotelTypeEnum.ScandicGo) {
|
||||
return smallSize ? <ScandicGoSmallMarker /> : <ScandicGoMarker />
|
||||
}
|
||||
|
||||
switch (hotelId) {
|
||||
case SignatureHotelEnum.Haymarket:
|
||||
return smallSize ? <HaymarketSmallMarker /> : <HaymarketMarker />
|
||||
case SignatureHotelEnum.HotelNorge:
|
||||
return smallSize ? <HotelNorgeSmallMarker /> : <HotelNorgeMarker />
|
||||
case SignatureHotelEnum.DowntownCamper:
|
||||
return smallSize ? (
|
||||
<DowntownCamperSmallMarker />
|
||||
) : (
|
||||
<DowntownCamperMarker />
|
||||
)
|
||||
case SignatureHotelEnum.GrandHotelOslo:
|
||||
return smallSize ? <GrandHotelSmallMarker /> : <GrandHotelMarker />
|
||||
case SignatureHotelEnum.Marski:
|
||||
return smallSize ? <MarskiSmallMarker /> : <MarskiMarker />
|
||||
default:
|
||||
return smallSize ? <ScandicSmallMarker /> : <ScandicMarker />
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user