From b9dbcf7d90ff77825eecc9e045ead81df59aac5a Mon Sep 17 00:00:00 2001 From: Niclas Edenvin Date: Fri, 20 Sep 2024 13:05:23 +0000 Subject: [PATCH 1/3] Merged in feat/booking-flow-submit (pull request #580) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This implements the actual call to the API to create a booking. That’s the only thing it does, it doesn’t handle the response in any way. This PR is just to get it there and the new booking sub team will handle it further, with payment etc. Approved-by: Michael Zetterberg Approved-by: Fredrik Thorsson Approved-by: Simon.Emanuelsson --- .../SelectRate/Payment/index.tsx | 60 +++++++- .../SelectRate/Payment/payment.module.css | 2 - lib/api/endpoints.ts | 1 + server/index.ts | 2 + server/routers/booking/index.ts | 5 + server/routers/booking/input.ts | 38 ++++++ server/routers/booking/mutation.ts | 129 ++++++++++++++++++ server/routers/booking/output.ts | 34 +++++ server/routers/user/query.ts | 2 +- 9 files changed, 268 insertions(+), 5 deletions(-) delete mode 100644 components/HotelReservation/SelectRate/Payment/payment.module.css create mode 100644 server/routers/booking/index.ts create mode 100644 server/routers/booking/input.ts create mode 100644 server/routers/booking/mutation.ts create mode 100644 server/routers/booking/output.ts diff --git a/components/HotelReservation/SelectRate/Payment/index.tsx b/components/HotelReservation/SelectRate/Payment/index.tsx index a9915a310..ed8068076 100644 --- a/components/HotelReservation/SelectRate/Payment/index.tsx +++ b/components/HotelReservation/SelectRate/Payment/index.tsx @@ -1,6 +1,62 @@ "use client" -import styles from "./payment.module.css" + +import { trpc } from "@/lib/trpc/client" + +import Button from "@/components/TempDesignSystem/Button" export default function Payment() { - return
Payment TBI
+ const initiateBooking = trpc.booking.booking.create.useMutation({ + onSuccess: (result) => { + // TODO: Handle success, poll for payment link and redirect the user to the payment + console.log("Res", result) + }, + onError: () => { + // TODO: Handle error + console.log("Error") + }, + }) + + return ( + + ) } diff --git a/components/HotelReservation/SelectRate/Payment/payment.module.css b/components/HotelReservation/SelectRate/Payment/payment.module.css deleted file mode 100644 index ec81ef8e9..000000000 --- a/components/HotelReservation/SelectRate/Payment/payment.module.css +++ /dev/null @@ -1,2 +0,0 @@ -.wrapper { -} diff --git a/lib/api/endpoints.ts b/lib/api/endpoints.ts index 03af495fc..14460c1a9 100644 --- a/lib/api/endpoints.ts +++ b/lib/api/endpoints.ts @@ -16,6 +16,7 @@ export namespace endpoints { hotels = "hotel/v1/Hotels", intiateSaveCard = `${creditCards}/initiateSaveCard`, deleteCreditCard = `${profile}/creditCards`, + booking = "booking/v1/Bookings", } } diff --git a/server/index.ts b/server/index.ts index 9b4f7ca5c..6f41f4391 100644 --- a/server/index.ts +++ b/server/index.ts @@ -1,10 +1,12 @@ /** Routers */ +import { bookingRouter } from "./routers/booking" import { contentstackRouter } from "./routers/contentstack" import { hotelsRouter } from "./routers/hotels" import { userRouter } from "./routers/user" import { router } from "./trpc" export const appRouter = router({ + booking: bookingRouter, contentstack: contentstackRouter, hotel: hotelsRouter, user: userRouter, diff --git a/server/routers/booking/index.ts b/server/routers/booking/index.ts new file mode 100644 index 000000000..65b968733 --- /dev/null +++ b/server/routers/booking/index.ts @@ -0,0 +1,5 @@ +import { mergeRouters } from "@/server/trpc" + +import { bookingMutationRouter } from "./mutation" + +export const bookingRouter = mergeRouters(bookingMutationRouter) diff --git a/server/routers/booking/input.ts b/server/routers/booking/input.ts new file mode 100644 index 000000000..46a88110e --- /dev/null +++ b/server/routers/booking/input.ts @@ -0,0 +1,38 @@ +import { z } from "zod" + +// Query +// Mutation +export const createBookingInput = z.object({ + hotelId: z.string(), + checkInDate: z.string(), + checkOutDate: z.string(), + rooms: z.array( + z.object({ + adults: z.number().int().nonnegative(), + children: z.number().int().nonnegative(), + rateCode: z.string(), + roomTypeCode: z.string(), + guest: z.object({ + title: z.string(), + firstName: z.string(), + lastName: z.string(), + email: z.string().email(), + phoneCountryCodePrefix: z.string(), + phoneNumber: z.string(), + countryCode: z.string(), + }), + smsConfirmationRequested: z.boolean(), + }) + ), + payment: z.object({ + cardHolder: z.object({ + Email: z.string().email(), + Name: z.string(), + PhoneCountryCode: z.string(), + PhoneSubscriber: z.string(), + }), + success: z.string(), + error: z.string(), + cancel: z.string(), + }), +}) diff --git a/server/routers/booking/mutation.ts b/server/routers/booking/mutation.ts new file mode 100644 index 000000000..2b35f56d4 --- /dev/null +++ b/server/routers/booking/mutation.ts @@ -0,0 +1,129 @@ +import { metrics } from "@opentelemetry/api" + +import * as api from "@/lib/api" +import { getVerifiedUser } from "@/server/routers/user/query" +import { router, safeProtectedProcedure } from "@/server/trpc" + +import { getMembership } from "@/utils/user" + +import { createBookingInput } from "./input" +import { createBookingSchema } from "./output" + +import type { Session } from "next-auth" + +const meter = metrics.getMeter("trpc.bookings") +const createBookingCounter = meter.createCounter("trpc.bookings.create") +const createBookingSuccessCounter = meter.createCounter( + "trpc.bookings.create-success" +) +const createBookingFailCounter = meter.createCounter( + "trpc.bookings.create-fail" +) + +async function getMembershipNumber( + session: Session | null +): Promise { + if (!session) return undefined + + const verifiedUser = await getVerifiedUser({ session }) + if (!verifiedUser || "error" in verifiedUser) { + return undefined + } + + const membership = getMembership(verifiedUser.data.memberships) + return membership?.membershipNumber +} + +export const bookingMutationRouter = router({ + booking: router({ + create: safeProtectedProcedure + .input(createBookingInput) + .mutation(async function ({ ctx, input }) { + const { checkInDate, checkOutDate, hotelId } = input + + const loggingAttributes = { + membershipNumber: await getMembershipNumber(ctx.session), + checkInDate, + checkOutDate, + hotelId, + } + + createBookingCounter.add(1, { hotelId, checkInDate, checkOutDate }) + + console.info( + "api.booking.booking.create start", + JSON.stringify({ + query: loggingAttributes, + }) + ) + const headers = ctx.session + ? { + Authorization: `Bearer ${ctx.session?.token.access_token}`, + } + : undefined + const apiResponse = await api.post(api.endpoints.v1.booking, { + headers, + body: input, + }) + + if (!apiResponse.ok) { + const text = await apiResponse.text() + createBookingFailCounter.add(1, { + hotelId, + checkInDate, + checkOutDate, + error_type: "http_error", + error: JSON.stringify({ + status: apiResponse.status, + }), + }) + console.error( + "api.booking.booking.create error", + JSON.stringify({ + query: loggingAttributes, + error: { + status: apiResponse.status, + statusText: apiResponse.statusText, + error: text, + }, + }) + ) + return null + } + + const apiJson = await apiResponse.json() + const verifiedData = createBookingSchema.safeParse(apiJson) + if (!verifiedData.success) { + createBookingFailCounter.add(1, { + hotelId, + checkInDate, + checkOutDate, + error_type: "validation_error", + }) + + console.error( + "api.booking.booking.create validation error", + JSON.stringify({ + query: loggingAttributes, + error: verifiedData.error, + }) + ) + return null + } + + createBookingSuccessCounter.add(1, { + hotelId, + checkInDate, + checkOutDate, + }) + + console.info( + "api.booking.booking.create success", + JSON.stringify({ + query: loggingAttributes, + }) + ) + return verifiedData.data + }), + }), +}) diff --git a/server/routers/booking/output.ts b/server/routers/booking/output.ts new file mode 100644 index 000000000..8fedd8716 --- /dev/null +++ b/server/routers/booking/output.ts @@ -0,0 +1,34 @@ +import { z } from "zod" + +export const createBookingSchema = z + .object({ + data: z.object({ + attributes: z.object({ + confirmationNumber: z.string(), + cancellationNumber: z.string().nullable(), + reservationStatus: z.string(), + paymentUrl: z.string().nullable(), + }), + type: z.string(), + id: z.string(), + links: z.object({ + self: z.object({ + href: z.string().url(), + meta: z.object({ + method: z.string(), + }), + }), + }), + }), + }) + .transform((d) => ({ + id: d.data.id, + links: d.data.links, + type: d.data.type, + confirmationNumber: d.data.attributes.confirmationNumber, + cancellationNumber: d.data.attributes.cancellationNumber, + reservationStatus: d.data.attributes.reservationStatus, + paymentUrl: d.data.attributes.paymentUrl, + })) + +type CreateBookingData = z.infer diff --git a/server/routers/user/query.ts b/server/routers/user/query.ts index 94312edc4..a482f9787 100644 --- a/server/routers/user/query.ts +++ b/server/routers/user/query.ts @@ -84,7 +84,7 @@ const getCreditCardsFailCounter = meter.createCounter( "trpc.user.creditCards-fail" ) -async function getVerifiedUser({ session }: { session: Session }) { +export async function getVerifiedUser({ session }: { session: Session }) { const now = Date.now() if (session.token.expires_at && session.token.expires_at < now) { From af850c90e7a931f228e02ed597ea1aefebc88858 Mon Sep 17 00:00:00 2001 From: Simon Emanuelsson Date: Wed, 28 Aug 2024 10:47:57 +0200 Subject: [PATCH 2/3] feat(SW-66, SW-348): search functionality and ui --- app/[lang]/(live)/(protected)/layout.tsx | 4 +- .../my-pages/@breadcrumbs/[...path]/page.tsx | 2 +- .../(protected)/my-pages/[...path]/page.tsx | 8 +- .../my-pages/profile/@profile/edit/page.tsx | 4 +- .../my-pages/profile/@profile/page.tsx | 8 +- .../my-pages/profile/edit/page.tsx | 2 +- .../(protected)/my-pages/profile/page.tsx | 2 +- .../[contentType]/[uid]/@breadcrumbs/page.tsx | 2 +- .../(live)/(public)/hotelreservation/page.tsx | 3 +- app/[lang]/(live)/@bookingwidget/page.tsx | 18 +- app/[lang]/(live)/layout.tsx | 4 +- .../(live)/middleware-error/[status]/page.tsx | 4 +- .../current-content-page/page.tsx | 4 +- app/[lang]/(live-current)/layout.tsx | 6 +- app/[lang]/(preview)/layout.tsx | 4 +- .../preview/[contentType]/[uid]/page.tsx | 6 +- app/[lang]/(preview-current)/layout.tsx | 6 +- .../preview-current/page.tsx | 6 +- .../webview/[contentType]/[uid]/page.tsx | 14 +- app/[lang]/webview/layout.tsx | 4 +- app/api/web/revalidate/manually/route.ts | 60 ++ app/api/web/revalidate/route.ts | 15 +- .../index.tsx => Blocks/CardsGrid.tsx} | 27 +- .../Benefits/CurrentLevel/current.module.css | 0 .../Benefits/CurrentLevel/index.tsx | 14 +- .../Benefits/NextLevel/index.tsx | 8 +- .../Benefits/NextLevel/next.module.css | 0 .../HowItWorks/howItWorks.module.css | 0 .../DynamicContent/HowItWorks/index.tsx | 27 + .../DynamicContent/LoyaltyLevels/index.tsx | 32 +- .../LoyaltyLevels/loyaltyLevels.module.css | 0 .../Overview/Buttons/CopyButton.tsx | 0 .../Overview/Buttons/copybutton.module.css | 0 .../Overview/Friend/Hero/hero.module.css | 0 .../Overview/Friend/Hero/hero.ts | 0 .../Overview/Friend/Hero/heroVariants.ts | 0 .../Overview/Friend/Hero/index.tsx | 0 .../Overview/Friend/MembershipLevel/index.tsx | 0 .../membershipLevel.module.css | 0 .../Friend/MembershipNumber}/index.tsx | 5 +- .../membershipNumber.module.css | 0 .../membershipNumberVariants.ts | 0 .../Overview/Friend/friend.module.css | 0 .../DynamicContent}/Overview/Friend/index.tsx | 18 +- .../Overview/Stats/ExpiringPoints/index.tsx | 0 .../Points/Container/container.module.css | 0 .../Overview/Stats/Points/Container/index.tsx | 0 .../Stats/Points/PointsColumn/index.tsx | 0 .../PointsColumn/pointsColumn.module.css | 0 .../Overview/Stats/Points/index.tsx | 0 .../DynamicContent}/Overview/Stats/index.tsx | 0 .../Overview/Stats/stats.module.css | 0 .../DynamicContent}/Overview/index.tsx | 10 +- .../Overview/overview.module.css | 0 .../BenefitCard/benefitCard.module.css | 0 .../OverviewTable/BenefitCard/index.tsx | 2 +- .../BenefitList/benefitList.module.css | 0 .../OverviewTable/BenefitList/index.tsx | 2 +- .../BenefitValue/benefitValue.module.css | 0 .../OverviewTable/BenefitValue/index.tsx | 2 +- .../DynamicContent/OverviewTable/Client.tsx} | 9 +- .../DesktopHeader/desktopHeader.module.css | 0 .../LargeTable/DesktopHeader/index.tsx | 2 +- .../OverviewTable/LargeTable/index.tsx | 2 +- .../LargeTable/largeTable.module.css | 0 .../OverviewTable/LevelSummary/index.tsx | 2 +- .../LevelSummary/levelSummary.module.css | 0 .../OverviewTable/YourLevelScript/index.tsx | 0 .../YourLevelScript/yourLevel.module.css | 0 .../DynamicContent/OverviewTable/data/DA.json | 0 .../DynamicContent/OverviewTable/data/DE.json | 0 .../DynamicContent/OverviewTable/data/EN.json | 0 .../DynamicContent/OverviewTable/data/FI.json | 0 .../DynamicContent/OverviewTable/data/NO.json | 0 .../DynamicContent/OverviewTable/data/SV.json | 0 .../DynamicContent/OverviewTable/index.tsx | 18 + .../OverviewTable/overviewTable.module.css | 0 .../AwardPoints/awardPoints.module.css | 0 .../AwardPoints/awardPointsVariants.ts | 0 .../Points/EarnAndBurn/AwardPoints/index.tsx | 0 .../EarnAndBurn/JourneyTable/Client.tsx | 0 .../JourneyTable/ClientTable/Row/index.tsx | 23 +- .../ClientTable/clientTable.module.css | 0 .../JourneyTable/ClientTable/index.tsx | 0 .../JourneyTable/Pagination/index.tsx | 0 .../Pagination/pagination.module.css | 0 .../Points/EarnAndBurn/JourneyTable/index.tsx | 0 .../Points/EarnAndBurn/index.tsx | 2 +- .../expiringPointsTable.module.css | 0 .../ExpiringPointsTable/index.tsx | 3 +- .../ExpiringPoints/expiringPoints.module.css | 0 .../Points/ExpiringPoints/index.tsx | 0 .../Points/Overview/Points/index.tsx | 16 +- .../DynamicContent}/Points/Overview/index.tsx | 9 +- .../Points/Overview/overview.module.css | 0 .../DynamicContent/SectionWrapper/index.tsx | 46 ++ .../SectionWrapper/sectionWrapper.module.css} | 0 .../Stays/ListContainer/container.module.css | 0 .../Stays/ListContainer/index.tsx | 0 .../DynamicContent}/Stays/Previous/Client.tsx | 2 +- .../emptyPreviousStays.module.css | 0 .../Previous/EmptyPreviousStays/index.tsx | 0 .../DynamicContent}/Stays/Previous/index.tsx | 0 .../Stays/ShowMoreButton/button.module.css | 0 .../Stays/ShowMoreButton/index.tsx | 0 .../emptyUpcomingStays.module.css | 0 .../Soonest/EmptyUpcomingStays/index.tsx | 0 .../DynamicContent}/Stays/Soonest/index.tsx | 8 +- .../DynamicContent}/Stays/StayCard/index.tsx | 0 .../Stays/StayCard/stay.module.css | 0 .../DynamicContent}/Stays/Upcoming/Client.tsx | 0 .../emptyUpcomingStays.module.css | 0 .../Upcoming/EmptyUpcomingStays/index.tsx | 0 .../DynamicContent}/Stays/Upcoming/index.tsx | 0 .../Stays/Upcoming/upcoming.module.css | 0 components/Blocks/DynamicContent/index.tsx | 61 ++ .../{MyPages => }/Blocks/Shortcuts/index.tsx | 0 .../Blocks/Shortcuts/shortcuts.module.css | 0 .../{Content => }/Blocks/TextCols/index.tsx | 6 +- .../Blocks/TextCols/renderOptions.tsx | 8 +- .../Blocks/TextCols/textcols.module.css | 0 components/Blocks/index.tsx | 64 ++ .../BookingWidget/bookingWidget.module.css | 2 + components/BookingWidget/index.tsx | 16 +- .../Breadcrumbs/breadcrumbs.module.css | 0 .../{MyPages => }/Breadcrumbs/index.tsx | 0 .../DynamicContent/HowItWorks/index.tsx | 13 - .../OverviewTable/BenefitCard/index.tsx | 53 -- .../OverviewTable/BenefitValue/index.tsx | 26 - .../LargeTable/DesktopHeader/index.tsx | 63 -- .../DynamicContent/OverviewTable/data/SV.json | 538 -------------- .../Content/Blocks/DynamicContent/index.tsx | 67 -- components/Content/Blocks/index.tsx | 48 -- .../JoinLoyalty/Contact/ContactRow/index.tsx | 57 -- .../Sidebar/JoinLoyalty/Contact/index.tsx | 33 - components/Content/Sidebar/index.tsx | 52 -- components/ContentType/ContentPage/index.tsx | 6 +- .../ContentType/HotelPage/Facilities/utils.ts | 17 +- components/ContentType/LoyaltyPage/index.tsx | 9 +- components/Current/Aside/Puff/index.tsx | 6 +- .../Current/Aside/Puff/renderOptions.tsx | 2 +- components/Current/Blocks/Text.tsx | 4 +- components/Current/Header/index.tsx | 12 +- components/Current/Preamble/index.tsx | 4 +- components/Current/Preamble/renderOptions.tsx | 2 +- components/Current/currentRenderOptions.tsx | 2 +- components/DeprecatedJsonToHtml/index.tsx | 20 + .../jsontohtml.module.css | 68 ++ .../DeprecatedJsonToHtml/renderOptions.tsx | 696 ++++++++++++++++++ components/DeprecatedJsonToHtml/utils.tsx | 138 ++++ .../ClearSearchButton/button.module.css | 19 + .../SearchList/ClearSearchButton/index.tsx | 47 ++ .../SearchList/ClearSearchButton/variants.ts | 17 + .../SearchList/Dialog/dialog.module.css | 33 + .../Search/SearchList/Dialog/index.tsx | 13 + .../Search/SearchList/Dialog/variants.ts | 18 + .../Search/SearchList/List/Label.tsx | 13 + .../Search/SearchList/List/ListItem/index.tsx | 40 + .../List/ListItem/listItem.module.css | 13 + .../SearchList/List/ListItem/variants.ts | 17 + .../Search/SearchList/List/index.tsx | 32 + .../Search/SearchList/List/list.module.css | 9 + .../FormContent/Search/SearchList/index.tsx | 174 +++++ .../Search/SearchList/searchList.module.css | 31 + .../FormContent/Search/index.tsx | 180 +++++ .../FormContent/Search/reducer.ts | 104 +++ .../FormContent/Search/search.module.css | 47 ++ .../FormContent/formContent.module.css | 29 +- .../Forms/BookingWidget/FormContent/index.tsx | 14 +- .../Forms/BookingWidget/form.module.css | 6 +- components/Forms/BookingWidget/index.tsx | 27 +- components/Forms/BookingWidget/schema.ts | 22 +- components/Icons/ErrorCircle.tsx | 40 + components/Icons/index.tsx | 3 +- components/JsonToHtml/index.tsx | 2 +- components/JsonToHtml/renderOptions.tsx | 96 ++- components/JsonToHtml/utils.tsx | 12 +- components/Loyalty/Blocks/CardsGrid/index.tsx | 52 -- .../HowItWorks/howItWorks.module.css | 9 - .../DynamicContent/HowItWorks/index.tsx | 13 - .../DynamicContent/LoyaltyLevels/index.tsx | 118 --- .../LoyaltyLevels/loyaltyLevels.module.css | 55 -- .../BenefitCard/benefitCard.module.css | 56 -- .../BenefitList/benefitList.module.css | 19 - .../OverviewTable/BenefitList/index.tsx | 31 - .../BenefitValue/benefitValue.module.css | 19 - .../DesktopHeader/desktopHeader.module.css | 28 - .../OverviewTable/LargeTable/index.tsx | 77 -- .../LargeTable/largeTable.module.css | 58 -- .../OverviewTable/LevelSummary/index.tsx | 17 - .../LevelSummary/levelSummary.module.css | 35 - .../OverviewTable/YourLevelScript/index.tsx | 19 - .../YourLevelScript/yourLevel.module.css | 10 - .../DynamicContent/OverviewTable/data/DA.json | 538 -------------- .../DynamicContent/OverviewTable/data/DE.json | 538 -------------- .../DynamicContent/OverviewTable/data/EN.json | 538 -------------- .../DynamicContent/OverviewTable/data/FI.json | 538 -------------- .../DynamicContent/OverviewTable/data/NO.json | 538 -------------- .../DynamicContent/OverviewTable/index.tsx | 278 ------- .../OverviewTable/overviewTable.module.css | 94 --- .../DynamicContent/dynamicContent.module.css | 30 - .../Loyalty/Blocks/DynamicContent/index.tsx | 67 -- components/Loyalty/Blocks/index.tsx | 53 -- .../Contact/ContactRow/contactRow.module.css | 5 - .../JoinLoyalty/Contact/contact.module.css | 19 - .../Loyalty/Sidebar/JoinLoyalty/index.tsx | 73 -- .../JoinLoyalty/joinLoyalty.module.css | 24 - .../Sidebar/MyPagesNavigation/index.tsx | 13 - components/Loyalty/Sidebar/index.tsx | 52 -- components/Loyalty/Sidebar/sidebar.module.css | 15 - components/MyPages/AccountPage/Content.tsx | 100 --- .../MyPages/AccountPage/Webview/Content.tsx | 110 --- .../MemershipNumber/membershipNumber.ts | 11 - .../Profile/DeleteCreditCardButton/index.tsx | 5 +- .../Profile/DeleteCreditCardConfirmation.tsx | 4 +- .../Contact/ContactRow/contactRow.module.css | 0 .../JoinLoyalty/Contact/ContactRow/index.tsx | 2 +- .../JoinLoyalty/Contact/contact.module.css | 0 .../Sidebar/JoinLoyalty/Contact/index.tsx | 14 +- .../Sidebar/JoinLoyalty/index.tsx | 8 +- .../JoinLoyalty/joinLoyalty.module.css | 0 .../MyPagesNavigation.tsx} | 2 +- components/Sidebar/index.tsx | 49 ++ .../{Content => }/Sidebar/sidebar.module.css | 0 .../LoyaltyCard/loyaltyCard.ts | 4 +- .../Text/Body/body.module.css | 4 + .../TempDesignSystem/Text/Body/variants.ts | 1 + .../Text/Caption/caption.module.css | 4 + .../TempDesignSystem/Text/Caption/variants.ts | 1 + .../Text/Footnote/footnote.module.css | 4 + .../Text/Footnote/variants.ts | 1 + components/Webviews/AccountPage/Blocks.tsx | 92 +++ .../AccountPage}/accountPage.module.css | 0 .../AccountPage/index.tsx} | 6 +- .../LoyaltyPage/Blocks.tsx} | 35 +- .../LoyaltyPage/index.tsx} | 3 +- .../LoyaltyPage}/loyaltyPage.module.css | 0 i18n/dictionaries/da.json | 56 +- i18n/dictionaries/de.json | 61 +- i18n/dictionaries/en.json | 15 +- i18n/dictionaries/fi.json | 56 +- i18n/dictionaries/no.json | 55 +- i18n/dictionaries/sv.json | 57 +- i18n/serverContext.ts | 6 +- lib/api/endpoints.ts | 18 +- lib/api/index.ts | 16 +- lib/discriminatedUnion.ts | 48 ++ .../Ref.graphql} | 0 lib/graphql/Fragments/Blocks/Card.graphql | 35 +- .../Fragments/Blocks/CardsGrid.graphql | 68 ++ lib/graphql/Fragments/Blocks/Content.graphql | 87 +++ .../Fragments/Blocks/DynamicContent.graphql | 119 +++ .../Fragments/Blocks/LoyaltyCard.graphql | 7 +- .../Fragments/Blocks/Refs/Card.graphql | 1 - .../Fragments/Blocks/Refs/LoyaltyCard.graphql | 1 - .../Fragments/Blocks/Shortcuts.graphql | 77 ++ lib/graphql/Fragments/Blocks/TextCols.graphql | 49 ++ .../TextContent.graphql} | 6 +- .../Fragments/Breadcrumbs/AccountPage.graphql | 24 + .../Fragments/Breadcrumbs/Breadcrumbs.graphql | 31 + .../Fragments/Breadcrumbs/ContentPage.graphql | 24 + .../CurrentBlocksPage.graphql} | 2 +- .../Fragments/Breadcrumbs/LoyaltyPage.graphql | 24 + .../Fragments/ContentPage/Breadcrumbs.graphql | 37 - .../Ref.graphql} | 0 .../CurrentFooter/AppDownloads.graphql | 2 +- .../CurrentFooter/SocialMedia.graphql | 2 +- .../Ref.graphql} | 0 lib/graphql/Fragments/ImageContainer.graphql | 16 + .../Fragments/LoyaltyPage/Breadcrumbs.graphql | 37 - .../Ref.graphql} | 0 .../AccountPageContentDynamicContent.graphql | 22 - .../AccountPageContentShortcuts.graphql | 25 - .../Fragments/MyPages/Breadcrumbs.graphql | 25 - .../PageLink/AccountPageLink.graphql | 5 +- .../PageLink/ContentPageLink.graphql | 9 +- .../PageLink/CurrentBlocksPageLink.graphql | 9 +- .../PageLink/CurrentContentPageLink.graphql | 9 +- .../Fragments/PageLink/HotelPageLink.graphql | 5 +- .../PageLink/LoyaltyPageLink.graphql | 9 +- .../Refs/ContentPage/Breadcrumbs.graphql | 38 - .../Refs/LoyaltyPage/Breadcrumbs.graphql | 38 - .../Refs/MyPages/Breadcrumbs.graphql | 28 - lib/graphql/Fragments/Sidebar/Content.graphql | 80 ++ .../Fragments/Sidebar/DynamicContent.graphql | 11 + .../Sidebar/JoinLoyaltyContact.graphql | 113 +++ .../Fragments/{Refs => }/System.graphql | 1 + lib/graphql/Query/AccountPage.graphql | 107 --- .../Query/AccountPage/AccountPage.graphql | 61 ++ .../MetaData.graphql} | 5 +- .../Navigation.graphql} | 14 +- .../Query/Breadcrumbs/AccountPage.graphql | 28 + .../Query/Breadcrumbs/ContentPage.graphql | 28 + .../Query/Breadcrumbs/LoyaltyPage.graphql | 28 + .../Query/BreadcrumbsContentPage.graphql | 21 - .../Query/BreadcrumbsLoyaltyPage.graphql | 21 - lib/graphql/Query/BreadcrumbsMyPages.graphql | 21 - lib/graphql/Query/ContentPage.graphql | 384 ---------- .../Query/ContentPage/ContentPage.graphql | 86 +++ .../{ => Current}/CurrentBlockPage.graphql | 18 +- .../CurrentBlockPageTrackingData.graphql | 0 lib/graphql/Query/Current/Footer.graphql | 36 + .../Header.graphql} | 4 +- .../LanguageSwitcher.graphql} | 0 lib/graphql/Query/CurrentFooter.graphql | 37 - lib/graphql/Query/Footer.graphql | 10 +- lib/graphql/Query/Header.graphql | 10 +- .../Query/{ => HotelPage}/HotelPage.graphql | 38 +- lib/graphql/Query/LoyaltyPage.graphql | 372 ---------- .../Query/LoyaltyPage/LoyaltyPage.graphql | 99 +++ .../MetaData.graphql} | 5 +- lib/graphql/Query/ResolveEntry.graphql | 2 +- lib/graphql/_request.ts | 30 +- lib/graphql/request.ts | 2 +- lib/trpc/memoizedRequests/index.ts | 11 + middlewares/bookingFlow.ts | 17 +- middlewares/utils.ts | 1 - package-lock.json | 139 ++-- package.json | 3 +- public/_static/icons/close.svg | 8 + server/errors/trpc.ts | 4 +- .../contentstack/accountPage/output.ts | 220 ++---- .../routers/contentstack/accountPage/query.ts | 112 ++- .../routers/contentstack/accountPage/utils.ts | 33 +- server/routers/contentstack/base/output.ts | 156 ++-- server/routers/contentstack/base/query.ts | 29 +- .../contentstack/bookingwidget/query.ts | 127 ++-- .../contentstack/breadcrumbs/output.ts | 71 +- .../routers/contentstack/breadcrumbs/query.ts | 50 +- .../routers/contentstack/breadcrumbs/utils.ts | 21 +- .../contentstack/contentPage/output.ts | 467 ++++-------- .../routers/contentstack/contentPage/query.ts | 180 +---- .../routers/contentstack/contentPage/utils.ts | 127 ++-- .../routers/contentstack/hotelPage/output.ts | 62 +- .../routers/contentstack/hotelPage/query.ts | 15 +- .../contentstack/languageSwitcher/output.ts | 1 + .../contentstack/languageSwitcher/query.ts | 174 ++--- .../contentstack/loyaltyPage/output.ts | 568 +++++--------- .../routers/contentstack/loyaltyPage/query.ts | 209 ++---- .../routers/contentstack/loyaltyPage/utils.ts | 130 ++-- .../routers/contentstack/metadata/output.ts | 57 +- server/routers/contentstack/metadata/query.ts | 40 +- server/routers/contentstack/metadata/utils.ts | 2 +- .../contentstack/myPages/navigation/output.ts | 59 +- .../contentstack/myPages/navigation/query.ts | 2 +- .../contentstack/myPages/navigation/utils.ts | 6 +- .../schemas/blocks/activitiesCard.ts | 59 ++ .../contentstack/schemas/blocks/cardsGrid.ts | 162 ++++ .../contentstack/schemas/blocks/content.ts | 83 +++ .../schemas/blocks/contentEmbeds.ts | 23 + .../schemas/blocks/dynamicContent.ts | 79 ++ .../contentstack/schemas/blocks/image.ts | 27 + .../schemas/blocks/imageContainer.ts | 21 + .../contentstack/schemas/blocks/shortcuts.ts | 83 +++ .../contentstack/schemas/blocks/textCols.ts | 84 +++ .../schemas/blocks/textContent.ts | 25 + .../schemas/blocks/utils/buttonLinkSchema.ts | 54 ++ .../schemas/blocks/utils/linkConnection.ts | 25 + .../contentstack/schemas/imageVault.ts | 20 + .../routers/contentstack/schemas/metadata.ts | 46 ++ .../routers/contentstack/schemas/pageLinks.ts | 120 +++ .../contentstack/schemas/sidebar/content.ts | 87 +++ .../schemas/sidebar/dynamicContent.ts | 14 + .../schemas/sidebar/joinLoyaltyContact.ts | 58 ++ server/routers/contentstack/schemas/system.ts | 9 + server/routers/hotels/output.ts | 189 +++++ server/routers/hotels/query.ts | 174 +++-- server/routers/hotels/utils.ts | 184 +++++ server/routers/user/mutation.ts | 2 +- server/routers/user/output.ts | 76 +- server/routers/user/query.ts | 131 +--- server/routers/user/temp.ts | 123 ---- server/routers/user/utils.ts | 116 +++ types/components/blocks/cardsGrid.ts | 5 + types/components/blocks/dynamicContent.ts | 20 + types/components/blocks/index.ts | 9 + types/components/blocks/textCols.ts | 3 + types/components/content/blocks.ts | 109 --- types/components/content/enums.ts | 42 -- types/components/content/sidebar.ts | 22 - ...{jsontohtml.ts => deprecatedjsontohtml.ts} | 2 +- types/components/form/bookingwidget.ts | 55 ++ types/components/hotelPage/enums.ts | 3 - types/components/loyalty/enums.ts | 43 -- types/components/loyalty/sidebar.ts | 23 - types/components/metadata/index.ts | 2 +- types/components/myPages/friend.ts | 4 + types/components/myPages/membershipNumber.ts | 10 + .../components/myPages/myPage/accountPage.ts | 22 +- types/components/myPages/myPage/challenges.ts | 6 - .../components/myPages/myPage/earnAndBurn.ts | 2 +- types/components/myPages/myPage/enums.ts | 32 - types/components/myPages/myPage/shortcuts.ts | 13 +- types/components/myPages/stays/previous.ts | 1 - .../{loyalty/blocks.ts => overviewTable.ts} | 29 +- types/components/search.ts | 54 ++ types/components/sidebar/index.ts | 8 + .../components/sidebar/joinLoyaltyContact.ts | 17 + types/discriminatedUnion.ts | 7 + types/enums/accountPage.ts | 9 + types/enums/blocks.ts | 10 + types/enums/cardsGrid.ts | 6 + types/enums/content.ts | 10 + types/enums/contentPage.ts | 17 + types/enums/dynamicContent.ts | 45 ++ types/enums/hotelPage.ts | 7 + types/enums/joinLoyaltyContact.ts | 11 + types/enums/loyaltyPage.ts | 16 + types/enums/sidebar.ts | 7 + types/enums/transactions.ts | 15 + types/image.ts | 6 +- types/requests/embeds.ts | 27 +- types/requests/imageContainer.ts | 22 +- types/requests/languageSwitcher.ts | 5 +- types/requests/system.ts | 3 + types/requests/utils/asset.ts | 6 +- types/requests/utils/pageLink.ts | 26 +- types/rte/attrs.ts | 13 +- types/rte/node.ts | 2 +- types/transitionTypes/jsontohtml.ts | 12 + types/transitionTypes/rte/attrs.ts | 46 ++ types/transitionTypes/rte/enums.ts | 64 ++ types/transitionTypes/rte/node.ts | 97 +++ types/transitionTypes/rte/option.ts | 5 + .../trpc/routers/contentstack/accountPage.ts | 27 + types/trpc/routers/contentstack/blocks.ts | 16 + .../trpc/routers/contentstack/contentPage.ts | 106 +-- types/trpc/routers/contentstack/hotelPage.ts | 15 + .../trpc/routers/contentstack/loyaltyPage.ts | 23 + types/trpc/routers/contentstack/sidebar.ts | 12 + types/trpc/routers/hotel/locations.ts | 8 + types/trpc/routers/utils/embeds.ts | 5 + types/user.ts | 29 +- utils/generateMetadata.ts | 29 + utils/generateTag.ts | 14 + utils/loyaltyTable.ts | 5 +- utils/user.ts | 4 +- 437 files changed, 7663 insertions(+), 9881 deletions(-) create mode 100644 app/api/web/revalidate/manually/route.ts rename components/{Content/Blocks/CardsGrid/index.tsx => Blocks/CardsGrid.tsx} (82%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Benefits/CurrentLevel/current.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Benefits/CurrentLevel/index.tsx (82%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Benefits/NextLevel/index.tsx (91%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Benefits/NextLevel/next.module.css (100%) rename components/{Content => }/Blocks/DynamicContent/HowItWorks/howItWorks.module.css (100%) create mode 100644 components/Blocks/DynamicContent/HowItWorks/index.tsx rename components/{Content => }/Blocks/DynamicContent/LoyaltyLevels/index.tsx (79%) rename components/{Content => }/Blocks/DynamicContent/LoyaltyLevels/loyaltyLevels.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Buttons/CopyButton.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Buttons/copybutton.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Friend/Hero/hero.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Friend/Hero/hero.ts (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Friend/Hero/heroVariants.ts (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Friend/Hero/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Friend/MembershipLevel/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Friend/MembershipLevel/membershipLevel.module.css (100%) rename components/{MyPages/Blocks/Overview/Friend/MemershipNumber => Blocks/DynamicContent/Overview/Friend/MembershipNumber}/index.tsx (85%) rename components/{MyPages/Blocks/Overview/Friend/MemershipNumber => Blocks/DynamicContent/Overview/Friend/MembershipNumber}/membershipNumber.module.css (100%) rename components/{MyPages/Blocks/Overview/Friend/MemershipNumber => Blocks/DynamicContent/Overview/Friend/MembershipNumber}/membershipNumberVariants.ts (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Friend/friend.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Friend/index.tsx (74%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Stats/ExpiringPoints/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Stats/Points/Container/container.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Stats/Points/Container/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Stats/Points/PointsColumn/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Stats/Points/PointsColumn/pointsColumn.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Stats/Points/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Stats/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/Stats/stats.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/index.tsx (75%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Overview/overview.module.css (100%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/BenefitCard/benefitCard.module.css (100%) rename components/{Loyalty => }/Blocks/DynamicContent/OverviewTable/BenefitCard/index.tsx (95%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/BenefitList/benefitList.module.css (100%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/BenefitList/index.tsx (92%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/BenefitValue/benefitValue.module.css (100%) rename components/{Loyalty => }/Blocks/DynamicContent/OverviewTable/BenefitValue/index.tsx (90%) rename components/{Content/Blocks/DynamicContent/OverviewTable/index.tsx => Blocks/DynamicContent/OverviewTable/Client.tsx} (98%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/LargeTable/DesktopHeader/desktopHeader.module.css (100%) rename components/{Loyalty => }/Blocks/DynamicContent/OverviewTable/LargeTable/DesktopHeader/index.tsx (97%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/LargeTable/index.tsx (97%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/LargeTable/largeTable.module.css (100%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/LevelSummary/index.tsx (84%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/LevelSummary/levelSummary.module.css (100%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/YourLevelScript/index.tsx (100%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/YourLevelScript/yourLevel.module.css (100%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/data/DA.json (100%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/data/DE.json (100%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/data/EN.json (100%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/data/FI.json (100%) rename components/{Content => }/Blocks/DynamicContent/OverviewTable/data/NO.json (100%) rename components/{Loyalty => }/Blocks/DynamicContent/OverviewTable/data/SV.json (100%) create mode 100644 components/Blocks/DynamicContent/OverviewTable/index.tsx rename components/{Content => }/Blocks/DynamicContent/OverviewTable/overviewTable.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/AwardPoints/awardPoints.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/AwardPoints/awardPointsVariants.ts (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/AwardPoints/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/JourneyTable/Client.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/JourneyTable/ClientTable/Row/index.tsx (81%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/JourneyTable/ClientTable/clientTable.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/JourneyTable/ClientTable/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/JourneyTable/Pagination/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/JourneyTable/Pagination/pagination.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/JourneyTable/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/EarnAndBurn/index.tsx (92%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/ExpiringPoints/ExpiringPointsTable/expiringPointsTable.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/ExpiringPoints/ExpiringPointsTable/index.tsx (93%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/ExpiringPoints/expiringPoints.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/ExpiringPoints/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/Overview/Points/index.tsx (86%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/Overview/index.tsx (76%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Points/Overview/overview.module.css (100%) create mode 100644 components/Blocks/DynamicContent/SectionWrapper/index.tsx rename components/{Content/Blocks/DynamicContent/dynamicContent.module.css => Blocks/DynamicContent/SectionWrapper/sectionWrapper.module.css} (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/ListContainer/container.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/ListContainer/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Previous/Client.tsx (95%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Previous/EmptyPreviousStays/emptyPreviousStays.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Previous/EmptyPreviousStays/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Previous/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/ShowMoreButton/button.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/ShowMoreButton/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Soonest/EmptyUpcomingStays/emptyUpcomingStays.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Soonest/EmptyUpcomingStays/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Soonest/index.tsx (83%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/StayCard/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/StayCard/stay.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Upcoming/Client.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Upcoming/EmptyUpcomingStays/emptyUpcomingStays.module.css (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Upcoming/EmptyUpcomingStays/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Upcoming/index.tsx (100%) rename components/{MyPages/Blocks => Blocks/DynamicContent}/Stays/Upcoming/upcoming.module.css (100%) create mode 100644 components/Blocks/DynamicContent/index.tsx rename components/{MyPages => }/Blocks/Shortcuts/index.tsx (100%) rename components/{MyPages => }/Blocks/Shortcuts/shortcuts.module.css (100%) rename components/{Content => }/Blocks/TextCols/index.tsx (80%) rename components/{Content => }/Blocks/TextCols/renderOptions.tsx (85%) rename components/{Content => }/Blocks/TextCols/textcols.module.css (100%) create mode 100644 components/Blocks/index.tsx rename components/{MyPages => }/Breadcrumbs/breadcrumbs.module.css (100%) rename components/{MyPages => }/Breadcrumbs/index.tsx (100%) delete mode 100644 components/Content/Blocks/DynamicContent/HowItWorks/index.tsx delete mode 100644 components/Content/Blocks/DynamicContent/OverviewTable/BenefitCard/index.tsx delete mode 100644 components/Content/Blocks/DynamicContent/OverviewTable/BenefitValue/index.tsx delete mode 100644 components/Content/Blocks/DynamicContent/OverviewTable/LargeTable/DesktopHeader/index.tsx delete mode 100644 components/Content/Blocks/DynamicContent/OverviewTable/data/SV.json delete mode 100644 components/Content/Blocks/DynamicContent/index.tsx delete mode 100644 components/Content/Blocks/index.tsx delete mode 100644 components/Content/Sidebar/JoinLoyalty/Contact/ContactRow/index.tsx delete mode 100644 components/Content/Sidebar/JoinLoyalty/Contact/index.tsx delete mode 100644 components/Content/Sidebar/index.tsx create mode 100644 components/DeprecatedJsonToHtml/index.tsx create mode 100644 components/DeprecatedJsonToHtml/jsontohtml.module.css create mode 100644 components/DeprecatedJsonToHtml/renderOptions.tsx create mode 100644 components/DeprecatedJsonToHtml/utils.tsx create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/ClearSearchButton/button.module.css create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/ClearSearchButton/index.tsx create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/ClearSearchButton/variants.ts create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/Dialog/dialog.module.css create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/Dialog/index.tsx create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/Dialog/variants.ts create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/List/Label.tsx create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/List/ListItem/index.tsx create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/List/ListItem/listItem.module.css create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/List/ListItem/variants.ts create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/List/index.tsx create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/List/list.module.css create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/index.tsx create mode 100644 components/Forms/BookingWidget/FormContent/Search/SearchList/searchList.module.css create mode 100644 components/Forms/BookingWidget/FormContent/Search/index.tsx create mode 100644 components/Forms/BookingWidget/FormContent/Search/reducer.ts create mode 100644 components/Forms/BookingWidget/FormContent/Search/search.module.css create mode 100644 components/Icons/ErrorCircle.tsx delete mode 100644 components/Loyalty/Blocks/CardsGrid/index.tsx delete mode 100644 components/Loyalty/Blocks/DynamicContent/HowItWorks/howItWorks.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/HowItWorks/index.tsx delete mode 100644 components/Loyalty/Blocks/DynamicContent/LoyaltyLevels/index.tsx delete mode 100644 components/Loyalty/Blocks/DynamicContent/LoyaltyLevels/loyaltyLevels.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/BenefitCard/benefitCard.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/BenefitList/benefitList.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/BenefitList/index.tsx delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/BenefitValue/benefitValue.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/LargeTable/DesktopHeader/desktopHeader.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/LargeTable/index.tsx delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/LargeTable/largeTable.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/LevelSummary/index.tsx delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/LevelSummary/levelSummary.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/YourLevelScript/index.tsx delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/YourLevelScript/yourLevel.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/data/DA.json delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/data/DE.json delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/data/EN.json delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/data/FI.json delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/data/NO.json delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/index.tsx delete mode 100644 components/Loyalty/Blocks/DynamicContent/OverviewTable/overviewTable.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/dynamicContent.module.css delete mode 100644 components/Loyalty/Blocks/DynamicContent/index.tsx delete mode 100644 components/Loyalty/Blocks/index.tsx delete mode 100644 components/Loyalty/Sidebar/JoinLoyalty/Contact/ContactRow/contactRow.module.css delete mode 100644 components/Loyalty/Sidebar/JoinLoyalty/Contact/contact.module.css delete mode 100644 components/Loyalty/Sidebar/JoinLoyalty/index.tsx delete mode 100644 components/Loyalty/Sidebar/JoinLoyalty/joinLoyalty.module.css delete mode 100644 components/Loyalty/Sidebar/MyPagesNavigation/index.tsx delete mode 100644 components/Loyalty/Sidebar/index.tsx delete mode 100644 components/Loyalty/Sidebar/sidebar.module.css delete mode 100644 components/MyPages/AccountPage/Content.tsx delete mode 100644 components/MyPages/AccountPage/Webview/Content.tsx delete mode 100644 components/MyPages/Blocks/Overview/Friend/MemershipNumber/membershipNumber.ts rename components/{Content => }/Sidebar/JoinLoyalty/Contact/ContactRow/contactRow.module.css (100%) rename components/{Loyalty => }/Sidebar/JoinLoyalty/Contact/ContactRow/index.tsx (94%) rename components/{Content => }/Sidebar/JoinLoyalty/Contact/contact.module.css (100%) rename components/{Loyalty => }/Sidebar/JoinLoyalty/Contact/index.tsx (58%) rename components/{Content => }/Sidebar/JoinLoyalty/index.tsx (91%) rename components/{Content => }/Sidebar/JoinLoyalty/joinLoyalty.module.css (100%) rename components/{Content/Sidebar/MyPagesNavigation/index.tsx => Sidebar/MyPagesNavigation.tsx} (85%) create mode 100644 components/Sidebar/index.tsx rename components/{Content => }/Sidebar/sidebar.module.css (100%) create mode 100644 components/Webviews/AccountPage/Blocks.tsx rename components/{ContentType/Webviews => Webviews/AccountPage}/accountPage.module.css (100%) rename components/{ContentType/Webviews/AccountPage.tsx => Webviews/AccountPage/index.tsx} (84%) rename components/{Loyalty/Blocks/WebView/index.tsx => Webviews/LoyaltyPage/Blocks.tsx} (60%) rename components/{ContentType/Webviews/LoyaltyPage.tsx => Webviews/LoyaltyPage/index.tsx} (93%) rename components/{ContentType/Webviews => Webviews/LoyaltyPage}/loyaltyPage.module.css (100%) create mode 100644 lib/discriminatedUnion.ts rename lib/graphql/Fragments/{Refs/MyPages/AccountPage.graphql => AccountPage/Ref.graphql} (100%) create mode 100644 lib/graphql/Fragments/Blocks/CardsGrid.graphql create mode 100644 lib/graphql/Fragments/Blocks/Content.graphql create mode 100644 lib/graphql/Fragments/Blocks/DynamicContent.graphql create mode 100644 lib/graphql/Fragments/Blocks/Shortcuts.graphql create mode 100644 lib/graphql/Fragments/Blocks/TextCols.graphql rename lib/graphql/Fragments/{MyPages/AccountPage/AccountPageContentTextContent.graphql => Blocks/TextContent.graphql} (67%) create mode 100644 lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql create mode 100644 lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql create mode 100644 lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql rename lib/graphql/Fragments/{Breadcrumbs.graphql => Breadcrumbs/CurrentBlocksPage.graphql} (55%) create mode 100644 lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql delete mode 100644 lib/graphql/Fragments/ContentPage/Breadcrumbs.graphql rename lib/graphql/Fragments/{Refs/ContentPage/ContentPage.graphql => ContentPage/Ref.graphql} (100%) rename lib/graphql/Fragments/{Refs/HotelPage/HotelPage.graphql => HotelPage/Ref.graphql} (100%) create mode 100644 lib/graphql/Fragments/ImageContainer.graphql delete mode 100644 lib/graphql/Fragments/LoyaltyPage/Breadcrumbs.graphql rename lib/graphql/Fragments/{Refs/LoyaltyPage/LoyaltyPage.graphql => LoyaltyPage/Ref.graphql} (100%) delete mode 100644 lib/graphql/Fragments/MyPages/AccountPage/AccountPageContentDynamicContent.graphql delete mode 100644 lib/graphql/Fragments/MyPages/AccountPage/AccountPageContentShortcuts.graphql delete mode 100644 lib/graphql/Fragments/MyPages/Breadcrumbs.graphql delete mode 100644 lib/graphql/Fragments/Refs/ContentPage/Breadcrumbs.graphql delete mode 100644 lib/graphql/Fragments/Refs/LoyaltyPage/Breadcrumbs.graphql delete mode 100644 lib/graphql/Fragments/Refs/MyPages/Breadcrumbs.graphql create mode 100644 lib/graphql/Fragments/Sidebar/Content.graphql create mode 100644 lib/graphql/Fragments/Sidebar/DynamicContent.graphql create mode 100644 lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql rename lib/graphql/Fragments/{Refs => }/System.graphql (87%) delete mode 100644 lib/graphql/Query/AccountPage.graphql create mode 100644 lib/graphql/Query/AccountPage/AccountPage.graphql rename lib/graphql/Query/{MetaDataMyPages.graphql => AccountPage/MetaData.graphql} (79%) rename lib/graphql/Query/{NavigationMyPages.graphql => AccountPage/Navigation.graphql} (71%) create mode 100644 lib/graphql/Query/Breadcrumbs/AccountPage.graphql create mode 100644 lib/graphql/Query/Breadcrumbs/ContentPage.graphql create mode 100644 lib/graphql/Query/Breadcrumbs/LoyaltyPage.graphql delete mode 100644 lib/graphql/Query/BreadcrumbsContentPage.graphql delete mode 100644 lib/graphql/Query/BreadcrumbsLoyaltyPage.graphql delete mode 100644 lib/graphql/Query/BreadcrumbsMyPages.graphql delete mode 100644 lib/graphql/Query/ContentPage.graphql create mode 100644 lib/graphql/Query/ContentPage/ContentPage.graphql rename lib/graphql/Query/{ => Current}/CurrentBlockPage.graphql (55%) rename lib/graphql/Query/{ => Current}/CurrentBlockPageTrackingData.graphql (100%) create mode 100644 lib/graphql/Query/Current/Footer.graphql rename lib/graphql/Query/{CurrentHeader.graphql => Current/Header.graphql} (89%) rename lib/graphql/Query/{LanguageSwitcherCurrent.graphql => Current/LanguageSwitcher.graphql} (100%) delete mode 100644 lib/graphql/Query/CurrentFooter.graphql rename lib/graphql/Query/{ => HotelPage}/HotelPage.graphql (63%) delete mode 100644 lib/graphql/Query/LoyaltyPage.graphql create mode 100644 lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql rename lib/graphql/Query/{MetaDataLoyaltyPage.graphql => LoyaltyPage/MetaData.graphql} (79%) create mode 100644 lib/trpc/memoizedRequests/index.ts create mode 100644 public/_static/icons/close.svg create mode 100644 server/routers/contentstack/schemas/blocks/activitiesCard.ts create mode 100644 server/routers/contentstack/schemas/blocks/cardsGrid.ts create mode 100644 server/routers/contentstack/schemas/blocks/content.ts create mode 100644 server/routers/contentstack/schemas/blocks/contentEmbeds.ts create mode 100644 server/routers/contentstack/schemas/blocks/dynamicContent.ts create mode 100644 server/routers/contentstack/schemas/blocks/image.ts create mode 100644 server/routers/contentstack/schemas/blocks/imageContainer.ts create mode 100644 server/routers/contentstack/schemas/blocks/shortcuts.ts create mode 100644 server/routers/contentstack/schemas/blocks/textCols.ts create mode 100644 server/routers/contentstack/schemas/blocks/textContent.ts create mode 100644 server/routers/contentstack/schemas/blocks/utils/buttonLinkSchema.ts create mode 100644 server/routers/contentstack/schemas/blocks/utils/linkConnection.ts create mode 100644 server/routers/contentstack/schemas/metadata.ts create mode 100644 server/routers/contentstack/schemas/pageLinks.ts create mode 100644 server/routers/contentstack/schemas/sidebar/content.ts create mode 100644 server/routers/contentstack/schemas/sidebar/dynamicContent.ts create mode 100644 server/routers/contentstack/schemas/sidebar/joinLoyaltyContact.ts create mode 100644 server/routers/contentstack/schemas/system.ts delete mode 100644 server/routers/user/temp.ts create mode 100644 server/routers/user/utils.ts create mode 100644 types/components/blocks/cardsGrid.ts create mode 100644 types/components/blocks/dynamicContent.ts create mode 100644 types/components/blocks/index.ts create mode 100644 types/components/blocks/textCols.ts delete mode 100644 types/components/content/blocks.ts delete mode 100644 types/components/content/enums.ts delete mode 100644 types/components/content/sidebar.ts rename types/components/{jsontohtml.ts => deprecatedjsontohtml.ts} (88%) create mode 100644 types/components/form/bookingwidget.ts delete mode 100644 types/components/hotelPage/enums.ts delete mode 100644 types/components/loyalty/enums.ts delete mode 100644 types/components/loyalty/sidebar.ts create mode 100644 types/components/myPages/friend.ts create mode 100644 types/components/myPages/membershipNumber.ts delete mode 100644 types/components/myPages/myPage/challenges.ts delete mode 100644 types/components/myPages/myPage/enums.ts rename types/components/{loyalty/blocks.ts => overviewTable.ts} (77%) create mode 100644 types/components/search.ts create mode 100644 types/components/sidebar/index.ts create mode 100644 types/components/sidebar/joinLoyaltyContact.ts create mode 100644 types/discriminatedUnion.ts create mode 100644 types/enums/accountPage.ts create mode 100644 types/enums/blocks.ts create mode 100644 types/enums/cardsGrid.ts create mode 100644 types/enums/content.ts create mode 100644 types/enums/contentPage.ts create mode 100644 types/enums/dynamicContent.ts create mode 100644 types/enums/hotelPage.ts create mode 100644 types/enums/joinLoyaltyContact.ts create mode 100644 types/enums/loyaltyPage.ts create mode 100644 types/enums/sidebar.ts create mode 100644 types/enums/transactions.ts create mode 100644 types/transitionTypes/jsontohtml.ts create mode 100644 types/transitionTypes/rte/attrs.ts create mode 100644 types/transitionTypes/rte/enums.ts create mode 100644 types/transitionTypes/rte/node.ts create mode 100644 types/transitionTypes/rte/option.ts create mode 100644 types/trpc/routers/contentstack/accountPage.ts create mode 100644 types/trpc/routers/contentstack/blocks.ts create mode 100644 types/trpc/routers/contentstack/hotelPage.ts create mode 100644 types/trpc/routers/contentstack/loyaltyPage.ts create mode 100644 types/trpc/routers/contentstack/sidebar.ts create mode 100644 types/trpc/routers/hotel/locations.ts create mode 100644 types/trpc/routers/utils/embeds.ts diff --git a/app/[lang]/(live)/(protected)/layout.tsx b/app/[lang]/(live)/(protected)/layout.tsx index e37122790..9273fda74 100644 --- a/app/[lang]/(live)/(protected)/layout.tsx +++ b/app/[lang]/(live)/(protected)/layout.tsx @@ -2,7 +2,7 @@ import { headers } from "next/headers" import { redirect } from "next/navigation" import { overview } from "@/constants/routes/myPages" -import { serverClient } from "@/lib/trpc/server" +import { getProfile } from "@/lib/trpc/memoizedRequests" import { auth } from "@/auth" import { getLang } from "@/i18n/serverContext" @@ -27,7 +27,7 @@ export default async function ProtectedLayout({ redirect(redirectURL) } - const user = await serverClient().user.get() + const user = await getProfile() if (user && "error" in user) { // redirect(redirectURL) diff --git a/app/[lang]/(live)/(protected)/my-pages/@breadcrumbs/[...path]/page.tsx b/app/[lang]/(live)/(protected)/my-pages/@breadcrumbs/[...path]/page.tsx index 41dea7b4a..a5b818f77 100644 --- a/app/[lang]/(live)/(protected)/my-pages/@breadcrumbs/[...path]/page.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/@breadcrumbs/[...path]/page.tsx @@ -1,4 +1,4 @@ -import Breadcrumbs from "@/components/MyPages/Breadcrumbs" +import Breadcrumbs from "@/components/Breadcrumbs" import { setLang } from "@/i18n/serverContext" import { LangParams, PageArgs } from "@/types/params" diff --git a/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx b/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx index 0c55a8469..ac3fec31a 100644 --- a/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/[...path]/page.tsx @@ -1,6 +1,6 @@ import { serverClient } from "@/lib/trpc/server" -import Content from "@/components/MyPages/AccountPage/Content" +import Blocks from "@/components/Blocks" import Title from "@/components/TempDesignSystem/Text/Title" import TrackingSDK from "@/components/TrackingSDK" import { getIntl } from "@/i18n" @@ -10,7 +10,7 @@ import styles from "./page.module.css" import type { LangParams, PageArgs } from "@/types/params" -export { generateMetadata } from "@/utils/generateMetadata" +export { generateMetadataAccountPage as generateMetadata } from "@/utils/generateMetadata" export default async function MyPages({ params, @@ -30,8 +30,8 @@ export default async function MyPages({ <>
{accountPage.heading} - {accountPage.content.length ? ( - + {accountPage.content?.length ? ( + ) : (

{formatMessage({ id: "No content published" })}

)} diff --git a/app/[lang]/(live)/(protected)/my-pages/profile/@profile/edit/page.tsx b/app/[lang]/(live)/(protected)/my-pages/profile/@profile/edit/page.tsx index 1f40f50ca..d4cee27f1 100644 --- a/app/[lang]/(live)/(protected)/my-pages/profile/@profile/edit/page.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/profile/@profile/edit/page.tsx @@ -1,4 +1,4 @@ -import { serverClient } from "@/lib/trpc/server" +import { getProfile } from "@/lib/trpc/memoizedRequests" import Form from "@/components/Forms/Edit/Profile" import { setLang } from "@/i18n/serverContext" @@ -10,7 +10,7 @@ export default async function EditProfileSlot({ }: PageArgs) { setLang(params.lang) - const user = await serverClient().user.get() + const user = await getProfile() if (!user || "error" in user) { return null } diff --git a/app/[lang]/(live)/(protected)/my-pages/profile/@profile/page.tsx b/app/[lang]/(live)/(protected)/my-pages/profile/@profile/page.tsx index 452444072..d858d5943 100644 --- a/app/[lang]/(live)/(protected)/my-pages/profile/@profile/page.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/profile/@profile/page.tsx @@ -1,6 +1,6 @@ import { languages, languageSelect } from "@/constants/languages" import { profileEdit } from "@/constants/routes/myPages" -import { serverClient } from "@/lib/trpc/server" +import { getProfile } from "@/lib/trpc/memoizedRequests" import { CalendarIcon, @@ -16,7 +16,7 @@ import Link from "@/components/TempDesignSystem/Link" import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { getIntl } from "@/i18n" -import { getLang, setLang } from "@/i18n/serverContext" +import { setLang } from "@/i18n/serverContext" import styles from "./page.module.css" @@ -25,7 +25,7 @@ import { LangParams, PageArgs } from "@/types/params" export default async function Profile({ params }: PageArgs) { setLang(params.lang) const { formatMessage } = await getIntl() - const user = await serverClient().user.get() + const user = await getProfile() if (!user || "error" in user) { return null } @@ -44,7 +44,7 @@ export default async function Profile({ params }: PageArgs) { diff --git a/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx b/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx index c2d24fe62..dd8c6eb91 100644 --- a/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/profile/edit/page.tsx @@ -1,5 +1,5 @@ import ProfilePage from "../page" -export { generateMetadata } from "@/utils/generateMetadata" +export { generateMetadataAccountPage as generateMetadata } from "@/utils/generateMetadata" export default ProfilePage diff --git a/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx b/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx index 749065fc5..ee8e3ad34 100644 --- a/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/profile/page.tsx @@ -7,7 +7,7 @@ import { setLang } from "@/i18n/serverContext" import { LangParams, PageArgs } from "@/types/params" -export { generateMetadata } from "@/utils/generateMetadata" +export { generateMetadataAccountPage as generateMetadata } from "@/utils/generateMetadata" export default async function ProfilePage({ params }: PageArgs) { setLang(params.lang) diff --git a/app/[lang]/(live)/(public)/[contentType]/[uid]/@breadcrumbs/page.tsx b/app/[lang]/(live)/(public)/[contentType]/[uid]/@breadcrumbs/page.tsx index 49117ee95..4119f48e3 100644 --- a/app/[lang]/(live)/(public)/[contentType]/[uid]/@breadcrumbs/page.tsx +++ b/app/[lang]/(live)/(public)/[contentType]/[uid]/@breadcrumbs/page.tsx @@ -1,4 +1,4 @@ -import Breadcrumbs from "@/components/MyPages/Breadcrumbs" +import Breadcrumbs from "@/components/Breadcrumbs" import { setLang } from "@/i18n/serverContext" import { LangParams, PageArgs } from "@/types/params" diff --git a/app/[lang]/(live)/(public)/hotelreservation/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/page.tsx index 425d8aef2..981b0d765 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/page.tsx @@ -1,9 +1,8 @@ import { setLang } from "@/i18n/serverContext" -import { LangParams, PageArgs } from "@/types/params" +import type { LangParams, PageArgs } from "@/types/params" export default function HotelReservationPage({ params }: PageArgs) { setLang(params.lang) - return null } diff --git a/app/[lang]/(live)/@bookingwidget/page.tsx b/app/[lang]/(live)/@bookingwidget/page.tsx index 35d0dceca..13a414cba 100644 --- a/app/[lang]/(live)/@bookingwidget/page.tsx +++ b/app/[lang]/(live)/@bookingwidget/page.tsx @@ -1,17 +1,17 @@ import { serverClient } from "@/lib/trpc/server" -import BookingWidget from "@/components/BookingWidget" +import BookingWidget, { preload } from "@/components/BookingWidget" export default async function BookingWidgetPage() { + preload() + // Get the booking widget show/hide status based on page specific settings const bookingWidgetToggle = - await serverClient().contentstack.bookingwidget.getToggle() + await serverClient().contentstack.bookingwidget.toggle.get() - return ( - <> - {bookingWidgetToggle && bookingWidgetToggle.hideBookingWidget ? null : ( - - )} - - ) + if (bookingWidgetToggle.hideBookingWidget) { + return null + } + + return } diff --git a/app/[lang]/(live)/layout.tsx b/app/[lang]/(live)/layout.tsx index 23857acb4..b79c9f9e8 100644 --- a/app/[lang]/(live)/layout.tsx +++ b/app/[lang]/(live)/layout.tsx @@ -17,7 +17,7 @@ import { ToastHandler } from "@/components/TempDesignSystem/Toasts" import { preloadUserTracking } from "@/components/TrackingSDK" import { getIntl } from "@/i18n" import ServerIntlProvider from "@/i18n/Provider" -import { getLang, setLang } from "@/i18n/serverContext" +import { setLang } from "@/i18n/serverContext" import type { LangParams, LayoutArgs } from "@/types/params" @@ -37,7 +37,7 @@ export default async function RootLayout({ const { defaultLocale, locale, messages } = await getIntl() return ( - +