Merged in feat/sw-2865-move-navigation-router-to-trpc-package (pull request #2427)
feat(SW-2862): Move navigation router to trpc package * Fix most errors in scandic-web Just 100 left... * Move Props type out of trpc * Fix CategorizedFilters types * Move more schemas in hotel router * Fix deps * fix getNonContentstackUrls * Fix import error * Fix entry error handling * Fix generateMetadata metrics * Fix alertType enum * Fix duplicated types * lint:fix * Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package * Fix broken imports * Move booking router to trpc package * Move partners router to trpc package * Move autocomplete router to trpc package * Move booking router to trpc package * Remove translations from My Pages navigation trpc procedure * Move navigation router to trpc package * Merge branch 'master' into feat/sw-2862-move-booking-router-to-trpc-package * Merge branch 'feat/sw-2862-move-booking-router-to-trpc-package' into feat/sw-2865-move-navigation-router-to-trpc-package * Merge branch 'master' into feat/sw-2865-move-navigation-router-to-trpc-package * Merge branch 'master' into feat/sw-2865-move-navigation-router-to-trpc-package * Merge branch 'master' into feat/sw-2865-move-navigation-router-to-trpc-package Approved-by: Linus Flood
This commit is contained in:
@@ -2,11 +2,10 @@
|
||||
import Link from "next/link"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { partnerSas } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { partnerSas } from "@/constants/routes/myPages"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
import { Link } from "react-aria-components"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { profile } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { profile } from "@/constants/routes/myPages"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ArrowLeft } from "react-feather"
|
||||
|
||||
import { overview as profileOverview } from "@/constants/routes/myPages"
|
||||
import { overview as profileOverview } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
@@ -13,12 +13,12 @@ import type { PropsWithChildren } from "react"
|
||||
|
||||
import type { LangParams, LayoutArgs } from "@/types/params"
|
||||
|
||||
export default async function SasXScandicLayout(props: PropsWithChildren<LayoutArgs<LangParams>>) {
|
||||
const params = await props.params;
|
||||
export default async function SasXScandicLayout(
|
||||
props: PropsWithChildren<LayoutArgs<LangParams>>
|
||||
) {
|
||||
const params = await props.params
|
||||
|
||||
const {
|
||||
children
|
||||
} = props;
|
||||
const { children } = props
|
||||
|
||||
const intl = await getIntl()
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ import { useTransition } from "react"
|
||||
import { FormProvider, useForm } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { profileEdit } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { profileEdit } from "@/constants/routes/myPages"
|
||||
import { sasPartnershipTermsAndConditions } from "@/constants/webHrefs"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { redirect } from "next/navigation"
|
||||
import React from "react"
|
||||
|
||||
import { getProfileSafely } from "@/lib/trpc/memoizedRequests"
|
||||
import { getEurobonusMembership } from "@scandic-hotels/trpc/routers/user/helpers"
|
||||
|
||||
import { getEurobonusMembership } from "@/utils/user"
|
||||
import { getProfileSafely } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import { SASModal } from "../components/SASModal"
|
||||
import { LinkAccountForm } from "./LinkAccountForm"
|
||||
@@ -11,7 +11,7 @@ import { LinkAccountForm } from "./LinkAccountForm"
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export default async function SASxScandicLinkPage(props: PageArgs<LangParams>) {
|
||||
const params = await props.params;
|
||||
const params = await props.params
|
||||
const profile = await getProfileSafely()
|
||||
|
||||
if (!profile || !profile.loyalty) return null
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import React from "react"
|
||||
|
||||
import { partnerSas } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { partnerSas } from "@/constants/routes/myPages"
|
||||
|
||||
import { Redirect } from "@/components/Redirect"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
@@ -13,7 +12,7 @@ import { SASModal } from "../../components/SASModal"
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export default async function SASxScandicLinkPage(props: PageArgs<LangParams>) {
|
||||
const params = await props.params;
|
||||
const params = await props.params
|
||||
const intl = await getIntl()
|
||||
|
||||
return (
|
||||
|
||||
@@ -2,13 +2,13 @@ import { cookies } from "next/headers"
|
||||
import { redirect } from "next/navigation"
|
||||
import { z } from "zod"
|
||||
|
||||
import { myPages } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
import { safeTry } from "@scandic-hotels/common/utils/safeTry"
|
||||
import {
|
||||
SAS_TOKEN_STORAGE_KEY,
|
||||
SAS_TRANSFER_POINT_KEY,
|
||||
} from "@scandic-hotels/trpc/constants/partnerSAS"
|
||||
|
||||
import { myPages } from "@/constants/routes/myPages"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import Link from "next/link"
|
||||
import React, { Suspense } from "react"
|
||||
|
||||
import { partnerSas } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { hotelreservation } from "@/constants/routes/hotelReservation"
|
||||
import { partnerSas } from "@/constants/routes/myPages"
|
||||
import { getProfileSafely } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import React from "react"
|
||||
|
||||
import { overview } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { overview } from "@/constants/routes/myPages"
|
||||
|
||||
import { Redirect } from "@/components/Redirect"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
@@ -12,8 +11,10 @@ import { SASModal } from "../../components/SASModal"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export default async function SASxScandicUnlinkSuccessPage(props: PageArgs<LangParams>) {
|
||||
const params = await props.params;
|
||||
export default async function SASxScandicUnlinkSuccessPage(
|
||||
props: PageArgs<LangParams>
|
||||
) {
|
||||
const params = await props.params
|
||||
const intl = await getIntl()
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user