feat(343): Style fixes on map

This commit is contained in:
Pontus Dreij
2024-11-01 09:39:34 +01:00
parent efad3381b6
commit 3a5ec28dc1
9 changed files with 94 additions and 66 deletions

View File

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

View File

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

View File

@@ -1,4 +1,5 @@
.layout {
min-height: 100dvh;
background-color: var(--Base-Background-Primary-Normal);
position: relative;
}

View File

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