Merged in feat/SW-3050-webviews (pull request #2429)

Feat/SW-3050 webviews

Approved-by: Anton Gunnarsson
This commit is contained in:
Linus Flood
2025-06-25 07:44:33 +00:00
parent 3d4d66870d
commit 7a56d21a3e
11 changed files with 461 additions and 850 deletions

View File

@@ -1,5 +1,8 @@
"use client"
import { usePathname } from "next/navigation"
import { isWebview } from "@/constants/routes/webviews"
import { useMyStayStore } from "@/stores/my-stay"
import AddToCalendar from "@/components/HotelReservation/AddToCalendar"
@@ -11,6 +14,8 @@ import AddToCalendarButton from "./AddToCalendarButton"
import type { EventAttributes } from "ics"
export default function AddToCalendarAction() {
const pathName = usePathname()
const { checkInDate, checkOutDate, createDateTime, hotel } = useMyStayStore(
(state) => ({
checkInDate: state.bookedRoom.checkInDate,
@@ -44,6 +49,10 @@ export default function AddToCalendarAction() {
hotel.hotelFacts.checkin.checkInTime
)
if (isWebview(pathName)) {
return null
}
return (
<AddToCalendar
checkInDate={checkInDate}