import { BookingWidget } from "@scandic-hotels/booking-flow/BookingWidget" import { parseBookingWidgetSearchParams } from "@scandic-hotels/booking-flow/utils/url" import { Typography } from "@scandic-hotels/design-system/Typography" import { bookingFlowConfig } from "@/constants/bookingFlowConfig" import { serverClient } from "@/lib/trpc" import { getIntl } from "@/i18n" import { getLang } from "@/i18n/serverContext" import { ClientComponent } from "../../../components/ClientComponent" type SearchParams = { searchParams: Promise } export default async function Debug(props: SearchParams) { const searchParams = await props.searchParams const intl = await getIntl() const lang = await getLang() const caller = await serverClient() const destinations = await caller.autocomplete.destinations({ lang, includeTypes: ["hotels"], query: "Göteborg", }) const hotel = destinations.hits.hotels[0].name const booking = parseBookingWidgetSearchParams(searchParams) return (
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}

from booking-flow package:


{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}

hello world with data: {hotel}

{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}

translated: {intl.formatMessage({ defaultMessage: "Map of the city" })}


) }