feat(343): Style fixes on map
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
"use client"
|
||||
|
||||
import { useRouter } from "next/navigation"
|
||||
import { type ElementRef, useEffect, useRef } from "react"
|
||||
|
||||
export function Modal({ children }: { children: React.ReactNode }) {
|
||||
const router = useRouter()
|
||||
const dialogRef = useRef<ElementRef<"dialog">>(null)
|
||||
|
||||
console.log("modal is open")
|
||||
|
||||
useEffect(() => {
|
||||
if (!dialogRef.current?.open) {
|
||||
dialogRef.current?.showModal()
|
||||
}
|
||||
}, [])
|
||||
|
||||
function onDismiss() {
|
||||
router.back()
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="modal-backdrop">
|
||||
<dialog ref={dialogRef} className="modal" onClose={onDismiss}>
|
||||
{children}
|
||||
<button onClick={onDismiss} className="close-button" />
|
||||
</dialog>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import { env } from "@/env/server"
|
||||
import { getLocations } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import SelectHotelMap from "@/components/HotelReservation/SelectHotel/SelectHotelMap"
|
||||
import getHotelReservationQueryParams from "@/components/HotelReservation/SelectRate/RoomSelection/utils"
|
||||
import { getHotelReservationQueryParams } from "@/components/HotelReservation/SelectRate/RoomSelection/utils"
|
||||
import { MapModal } from "@/components/MapModal"
|
||||
import { setLang } from "@/i18n/serverContext"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
.layout {
|
||||
min-height: 100dvh;
|
||||
background-color: var(--Base-Background-Primary-Normal);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
getPointOfInterests,
|
||||
} from "@/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils"
|
||||
import SelectHotelMap from "@/components/HotelReservation/SelectHotel/SelectHotelMap"
|
||||
import getHotelReservationQueryParams from "@/components/HotelReservation/SelectRate/RoomSelection/utils"
|
||||
import { getHotelReservationQueryParams } from "@/components/HotelReservation/SelectRate/RoomSelection/utils"
|
||||
import { setLang } from "@/i18n/serverContext"
|
||||
|
||||
import styles from "./page.module.css"
|
||||
|
||||
Reference in New Issue
Block a user