Merged in chore/no-unused-vars-lint-rule (pull request #1339)
chore: add no unused vars lint rule Approved-by: Michael Zetterberg
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
"plugins": ["simple-import-sort", "@typescript-eslint"],
|
"plugins": ["simple-import-sort", "@typescript-eslint"],
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"no-unused-vars": "off",
|
||||||
"react/function-component-definition": "error",
|
"react/function-component-definition": "error",
|
||||||
"simple-import-sort/imports": [
|
"simple-import-sort/imports": [
|
||||||
"error",
|
"error",
|
||||||
@@ -59,6 +60,18 @@
|
|||||||
"prefer-inline": true
|
"prefer-inline": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@typescript-eslint/consistent-type-imports": "error"
|
"@typescript-eslint/consistent-type-imports": "error",
|
||||||
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"args": "all",
|
||||||
|
"argsIgnorePattern": "^_",
|
||||||
|
"caughtErrors": "all",
|
||||||
|
"caughtErrorsIgnorePattern": "^_",
|
||||||
|
"destructuredArrayIgnorePattern": "^_",
|
||||||
|
"varsIgnorePattern": "^_",
|
||||||
|
"ignoreRestSiblings": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import {
|
|||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
import PaymentCallback from "@/components/HotelReservation/EnterDetails/Payment/PaymentCallback"
|
import PaymentCallback from "@/components/HotelReservation/EnterDetails/Payment/PaymentCallback"
|
||||||
import { trackPaymentEvent } from "@/utils/tracking"
|
|
||||||
|
|
||||||
import type { LangParams, PageArgs } from "@/types/params"
|
import type { LangParams, PageArgs } from "@/types/params"
|
||||||
|
|
||||||
@@ -62,7 +61,7 @@ export default async function PaymentCallbackPage({
|
|||||||
? error.errorCode.toString()
|
? error.errorCode.toString()
|
||||||
: PaymentErrorCodeEnum.Failed.toString()
|
: PaymentErrorCodeEnum.Failed.toString()
|
||||||
)
|
)
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.error(
|
console.error(
|
||||||
`[payment-callback] failed to get booking status for ${confirmationNumber}, status: ${status}`
|
`[payment-callback] failed to get booking status for ${confirmationNumber}, status: ${status}`
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { notFound } from "next/navigation"
|
|
||||||
import { Suspense } from "react"
|
import { Suspense } from "react"
|
||||||
|
|
||||||
import { SelectHotelMapContainer } from "@/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContainer"
|
import { SelectHotelMapContainer } from "@/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContainer"
|
||||||
@@ -6,8 +5,6 @@ import { SelectHotelMapContainerSkeleton } from "@/components/HotelReservation/S
|
|||||||
import { MapContainer } from "@/components/MapContainer"
|
import { MapContainer } from "@/components/MapContainer"
|
||||||
import { setLang } from "@/i18n/serverContext"
|
import { setLang } from "@/i18n/serverContext"
|
||||||
|
|
||||||
import { getHotelSearchDetails } from "../../utils"
|
|
||||||
|
|
||||||
import styles from "./page.module.css"
|
import styles from "./page.module.css"
|
||||||
|
|
||||||
import type { AlternativeHotelsSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"
|
import type { AlternativeHotelsSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { beforeAll, describe, expect, it } from "@jest/globals"
|
|||||||
import { getValidFromDate, getValidToDate } from "./getValidDates"
|
import { getValidFromDate, getValidToDate } from "./getValidDates"
|
||||||
|
|
||||||
const NOW = new Date("2020-10-01T00:00:00Z")
|
const NOW = new Date("2020-10-01T00:00:00Z")
|
||||||
let originalTz: string | undefined
|
|
||||||
|
|
||||||
describe("getValidFromDate", () => {
|
describe("getValidFromDate", () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export default async function CurrentContentPage({
|
|||||||
<Tracking pageData={trackingData} />
|
<Tracking pageData={trackingData} />
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
} catch (err) {
|
} catch {
|
||||||
return notFound()
|
return notFound()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import type { LangParams, PageArgs, SearchParams } from "@/types/params"
|
|||||||
|
|
||||||
export default async function Page({
|
export default async function Page({
|
||||||
searchParams,
|
searchParams,
|
||||||
params,
|
|
||||||
}: PageArgs<LangParams> & SearchParams<{ errorCode?: "dateOfBirthMismatch" }>) {
|
}: PageArgs<LangParams> & SearchParams<{ errorCode?: "dateOfBirthMismatch" }>) {
|
||||||
const intl = await getIntl()
|
const intl = await getIntl()
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { ArrowLeft } from "react-feather"
|
|||||||
import { overview as profileOverview } from "@/constants/routes/myPages"
|
import { overview as profileOverview } from "@/constants/routes/myPages"
|
||||||
|
|
||||||
import Image from "@/components/Image"
|
import Image from "@/components/Image"
|
||||||
import { ProtectedLayout } from "@/components/ProtectedLayout"
|
|
||||||
import Link from "@/components/TempDesignSystem/Link"
|
import Link from "@/components/TempDesignSystem/Link"
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
import background from "@/public/_static/img/partner/sas/sas_x_scandic_airplane_window_background.jpg"
|
import background from "@/public/_static/img/partner/sas/sas_x_scandic_airplane_window_background.jpg"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import React from "react"
|
|||||||
|
|
||||||
import { getProfileSafely } from "@/lib/trpc/memoizedRequests"
|
import { getProfileSafely } from "@/lib/trpc/memoizedRequests"
|
||||||
|
|
||||||
import { AlreadyLinkedError } from "../components/AlreadyLinkedError"
|
|
||||||
import { SASModal } from "../components/SASModal"
|
import { SASModal } from "../components/SASModal"
|
||||||
import { LinkAccountForm } from "./LinkAccountForm"
|
import { LinkAccountForm } from "./LinkAccountForm"
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,7 @@ import { getIntl } from "@/i18n"
|
|||||||
|
|
||||||
import { SASModal } from "../../components/SASModal"
|
import { SASModal } from "../../components/SASModal"
|
||||||
|
|
||||||
import type { LangParams, PageArgs } from "@/types/params"
|
export default async function SASxScandicLinkPage() {
|
||||||
|
|
||||||
export default async function SASxScandicLinkPage({
|
|
||||||
params,
|
|
||||||
}: PageArgs<LangParams>) {
|
|
||||||
const intl = await getIntl()
|
const intl = await getIntl()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { cookies } from "next/headers"
|
import { cookies } from "next/headers"
|
||||||
import { redirect, RedirectType } from "next/navigation"
|
import { redirect } from "next/navigation"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
@@ -8,7 +8,9 @@ import { getIntl } from "@/i18n"
|
|||||||
import { safeTry } from "@/utils/safeTry"
|
import { safeTry } from "@/utils/safeTry"
|
||||||
|
|
||||||
import { SAS_TOKEN_STORAGE_KEY } from "../sasUtils"
|
import { SAS_TOKEN_STORAGE_KEY } from "../sasUtils"
|
||||||
import OneTimePasswordForm, {type OnSubmitHandler } from "./OneTimePasswordForm"
|
import OneTimePasswordForm, {
|
||||||
|
type OnSubmitHandler,
|
||||||
|
} from "./OneTimePasswordForm"
|
||||||
|
|
||||||
import type { LangParams, PageArgs, SearchParams } from "@/types/params"
|
import type { LangParams, PageArgs, SearchParams } from "@/types/params"
|
||||||
import type { Lang } from "@/constants/languages"
|
import type { Lang } from "@/constants/languages"
|
||||||
@@ -125,7 +127,7 @@ function verifyTokenValidity(token: string | undefined) {
|
|||||||
const decoded = JSON.parse(atob(token.split(".")[1]))
|
const decoded = JSON.parse(atob(token.split(".")[1]))
|
||||||
const expiry = decoded.exp * 1000
|
const expiry = decoded.exp * 1000
|
||||||
return Date.now() < expiry
|
return Date.now() < expiry
|
||||||
} catch (error) {
|
} catch {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export default async function ContentTypePage({
|
|||||||
)
|
)
|
||||||
default:
|
default:
|
||||||
const u: never = user
|
const u: never = user
|
||||||
console.log(`[webview:page] unhandled user loading error`)
|
console.log("[webview:page] unhandled user loading error", u)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { env } from "process"
|
|
||||||
|
|
||||||
import { Lang } from "@/constants/languages"
|
import { Lang } from "@/constants/languages"
|
||||||
import { profile } from "@/constants/routes/myPages"
|
import { profile } from "@/constants/routes/myPages"
|
||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export async function POST(request: NextRequest) {
|
|||||||
|
|
||||||
let tag = ""
|
let tag = ""
|
||||||
if (content_type.uid === "hotel_page") {
|
if (content_type.uid === "hotel_page") {
|
||||||
const tag = generateHotelUrlTag(locale, entry.hotel_page_id)
|
tag = generateHotelUrlTag(locale, entry.hotel_page_id)
|
||||||
} else {
|
} else {
|
||||||
console.error(
|
console.error(
|
||||||
`Invalid content_type, received ${content_type.uid}, expected "hotel_page"`
|
`Invalid content_type, received ${content_type.uid}, expected "hotel_page"`
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
import { useIntl } from "react-intl"
|
|
||||||
|
|
||||||
import JsonToHtml from "@/components/JsonToHtml"
|
import JsonToHtml from "@/components/JsonToHtml"
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
@@ -17,8 +16,6 @@ import { HotelHashValues } from "@/types/components/hotelPage/tabNavigation"
|
|||||||
import type { RTENode } from "@/types/transitionTypes/rte/node"
|
import type { RTENode } from "@/types/transitionTypes/rte/node"
|
||||||
|
|
||||||
export default function AccordionSection({ accordion, title }: AccordionProps) {
|
export default function AccordionSection({ accordion, title }: AccordionProps) {
|
||||||
const intl = useIntl()
|
|
||||||
|
|
||||||
const showToggleButton = accordion.length > 5
|
const showToggleButton = accordion.length > 5
|
||||||
const [allAccordionsVisible, setAllAccordionsVisible] =
|
const [allAccordionsVisible, setAllAccordionsVisible] =
|
||||||
useState(!showToggleButton)
|
useState(!showToggleButton)
|
||||||
|
|||||||
@@ -12,11 +12,6 @@ export default async function HowItWorks({
|
|||||||
firstItem,
|
firstItem,
|
||||||
}: HowItWorksProps) {
|
}: HowItWorksProps) {
|
||||||
const intl = await getIntl()
|
const intl = await getIntl()
|
||||||
const displayHeader = !!(
|
|
||||||
dynamic_content.link ||
|
|
||||||
dynamic_content.subtitle ||
|
|
||||||
dynamic_content.title
|
|
||||||
)
|
|
||||||
return (
|
return (
|
||||||
<SectionWrapper dynamic_content={dynamic_content} firstItem={firstItem}>
|
<SectionWrapper dynamic_content={dynamic_content} firstItem={firstItem}>
|
||||||
<section className={styles.container}>
|
<section className={styles.container}>
|
||||||
|
|||||||
@@ -10,16 +10,7 @@ import Pagination from "@/components/MyPages/Pagination"
|
|||||||
|
|
||||||
import ClientTable from "./ClientTable"
|
import ClientTable from "./ClientTable"
|
||||||
|
|
||||||
import type { Transactions } from "@/types/components/myPages/myPage/earnAndBurn"
|
export default function TransactionTable() {
|
||||||
|
|
||||||
export default function TransactionTable({
|
|
||||||
initialJourneyTransactions,
|
|
||||||
}: {
|
|
||||||
initialJourneyTransactions: {
|
|
||||||
data: { transactions: Transactions }
|
|
||||||
meta: { totalPages: number }
|
|
||||||
}
|
|
||||||
}) {
|
|
||||||
const limit = 5
|
const limit = 5
|
||||||
const [page, setPage] = useState(1)
|
const [page, setPage] = useState(1)
|
||||||
const { data, isFetching, isLoading } =
|
const { data, isFetching, isLoading } =
|
||||||
@@ -29,8 +20,6 @@ export default function TransactionTable({
|
|||||||
page,
|
page,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// TODO: fix the initial data issues on page load
|
|
||||||
// initialData: initialJourneyTransactions,
|
|
||||||
placeholderData: keepPreviousData,
|
placeholderData: keepPreviousData,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,18 +1,5 @@
|
|||||||
import { serverClient } from "@/lib/trpc/server"
|
|
||||||
|
|
||||||
import ClientJourney from "./Client"
|
import ClientJourney from "./Client"
|
||||||
|
|
||||||
export default async function JourneyTable() {
|
export default async function JourneyTable() {
|
||||||
const initialJourneyTransactions =
|
return <ClientJourney />
|
||||||
await serverClient().user.transaction.friendTransactions({
|
|
||||||
page: 1,
|
|
||||||
limit: 5,
|
|
||||||
})
|
|
||||||
if (!initialJourneyTransactions?.data) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ClientJourney initialJourneyTransactions={initialJourneyTransactions} />
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import { createContext, useCallback, useContext, useEffect } from "react"
|
|||||||
|
|
||||||
import { trpc } from "@/lib/trpc/client"
|
import { trpc } from "@/lib/trpc/client"
|
||||||
|
|
||||||
import useLang from "@/hooks/useLang"
|
|
||||||
|
|
||||||
import type { RedeemFlowContext } from "@/types/components/myPages/myPage/accountPage"
|
import type { RedeemFlowContext } from "@/types/components/myPages/myPage/accountPage"
|
||||||
import type { RewardWithRedeem } from "@/server/routers/contentstack/reward/output"
|
import type { RewardWithRedeem } from "@/server/routers/contentstack/reward/output"
|
||||||
|
|
||||||
@@ -27,7 +25,6 @@ export default function useRedeemFlow() {
|
|||||||
timeRemaining,
|
timeRemaining,
|
||||||
setTimeRemaining,
|
setTimeRemaining,
|
||||||
} = useContext(RedeemContext)
|
} = useContext(RedeemContext)
|
||||||
const lang = useLang()
|
|
||||||
|
|
||||||
const update = trpc.contentstack.rewards.redeem.useMutation<{
|
const update = trpc.contentstack.rewards.redeem.useMutation<{
|
||||||
rewards: RewardWithRedeem[]
|
rewards: RewardWithRedeem[]
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ function getIconForRewardId(rewardId: RewardId): IconName {
|
|||||||
return IconName.GiftOpen
|
return IconName.GiftOpen
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
const unhandledRewardId: never = rewardId
|
|
||||||
return IconName.GiftOpen
|
return IconName.GiftOpen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
import { useIntl } from "react-intl"
|
|
||||||
|
|
||||||
import { dt } from "@/lib/dt"
|
import { dt } from "@/lib/dt"
|
||||||
|
|
||||||
@@ -19,7 +18,6 @@ import type { StayCardProps } from "@/types/components/myPages/stays/stayCard"
|
|||||||
|
|
||||||
export default function StayCard({ stay }: StayCardProps) {
|
export default function StayCard({ stay }: StayCardProps) {
|
||||||
const lang = useLang()
|
const lang = useLang()
|
||||||
const intl = useIntl()
|
|
||||||
|
|
||||||
// TODO: Temporary loading. Remove when current web is deleted.
|
// TODO: Temporary loading. Remove when current web is deleted.
|
||||||
const [loading, setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default function Marker({
|
|||||||
properties,
|
properties,
|
||||||
onMarkerClick,
|
onMarkerClick,
|
||||||
}: MarkerProps) {
|
}: MarkerProps) {
|
||||||
const [markerRef, marker] = useAdvancedMarkerRef()
|
const [markerRef] = useAdvancedMarkerRef()
|
||||||
const handleClick = useCallback(() => {
|
const handleClick = useCallback(() => {
|
||||||
if (onMarkerClick) {
|
if (onMarkerClick) {
|
||||||
onMarkerClick(position, properties)
|
onMarkerClick(position, properties)
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
import { activities } from "@/constants/routes/hotelPageParams"
|
|
||||||
|
|
||||||
import Button from "@/components/TempDesignSystem/Button"
|
import Button from "@/components/TempDesignSystem/Button"
|
||||||
import Link from "@/components/TempDesignSystem/Link"
|
import Link from "@/components/TempDesignSystem/Link"
|
||||||
import SidePeek from "@/components/TempDesignSystem/SidePeek"
|
import SidePeek from "@/components/TempDesignSystem/SidePeek"
|
||||||
import Preamble from "@/components/TempDesignSystem/Text/Preamble"
|
import Preamble from "@/components/TempDesignSystem/Text/Preamble"
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
import { getLang } from "@/i18n/serverContext"
|
|
||||||
|
|
||||||
import styles from "./activities.module.css"
|
import styles from "./activities.module.css"
|
||||||
|
|
||||||
@@ -16,7 +13,6 @@ export default async function ActivitiesSidePeek({
|
|||||||
sidepeekCTA,
|
sidepeekCTA,
|
||||||
sidepeekSlug,
|
sidepeekSlug,
|
||||||
}: ActivitiesSidePeekProps) {
|
}: ActivitiesSidePeekProps) {
|
||||||
const lang = getLang()
|
|
||||||
const intl = await getIntl()
|
const intl = await getIntl()
|
||||||
const { href, preamble } = contentPage
|
const { href, preamble } = contentPage
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ import type { ReactNode } from "react"
|
|||||||
import { DropdownTypeEnum } from "@/types/components/dropdown/dropdown"
|
import { DropdownTypeEnum } from "@/types/components/dropdown/dropdown"
|
||||||
|
|
||||||
export default function MyPagesMobileDropdown() {
|
export default function MyPagesMobileDropdown() {
|
||||||
const { data: myPagesNavigation } = useMyPagesNavigation()
|
|
||||||
|
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const { toggleDropdown, isMyPagesMobileMenuOpen } = useDropdownStore()
|
const { toggleDropdown, isMyPagesMobileMenuOpen } = useDropdownStore()
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ export async function TopMenuSkeleton() {
|
|||||||
<div className={styles.topMenu}>
|
<div className={styles.topMenu}>
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<ul className={styles.list}>
|
<ul className={styles.list}>
|
||||||
{links.map((link, i) => (
|
{links.map((_link, i) => (
|
||||||
<li key={i} className={styles.skeletonWrapper}>
|
<li key={i} className={styles.skeletonWrapper}>
|
||||||
<SkeletonShimmer width="100px" height="16px" />
|
<SkeletonShimmer width="100px" height="16px" />
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { usePathname, useSearchParams } from "next/navigation"
|
import { usePathname, useSearchParams } from "next/navigation"
|
||||||
import { useEffect, useState } from "react"
|
import { useEffect } from "react"
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
SiteSectionObject,
|
SiteSectionObject,
|
||||||
|
|||||||
@@ -7,10 +7,8 @@ import type { BookingWidgetSchema } from "@/types/components/bookingWidget"
|
|||||||
|
|
||||||
export default function TabletCodeInput({
|
export default function TabletCodeInput({
|
||||||
updateValue,
|
updateValue,
|
||||||
defaultValue,
|
|
||||||
}: {
|
}: {
|
||||||
updateValue: (val: string) => void
|
updateValue: (val: string) => void
|
||||||
defaultValue?: string
|
|
||||||
}) {
|
}) {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const { register } = useFormContext<BookingWidgetSchema>()
|
const { register } = useFormContext<BookingWidgetSchema>()
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export default function BookingCode() {
|
|||||||
<Checkbox
|
<Checkbox
|
||||||
checked={!!bookingCode?.value}
|
checked={!!bookingCode?.value}
|
||||||
{...register("bookingCode.flag", {
|
{...register("bookingCode.flag", {
|
||||||
onChange: function (e) {
|
onChange: function () {
|
||||||
if (bookingCode?.value || isOpen) {
|
if (bookingCode?.value || isOpen) {
|
||||||
setValue("bookingCode.flag", true)
|
setValue("bookingCode.flag", true)
|
||||||
}
|
}
|
||||||
@@ -128,10 +128,7 @@ export default function BookingCode() {
|
|||||||
<Dialog>
|
<Dialog>
|
||||||
{({ close }) => (
|
{({ close }) => (
|
||||||
<div className={styles.popover}>
|
<div className={styles.popover}>
|
||||||
<TabletCodeInput
|
<TabletCodeInput updateValue={updateBookingCodeFormValue} />
|
||||||
updateValue={updateBookingCodeFormValue}
|
|
||||||
defaultValue={bookingCode?.value}
|
|
||||||
/>
|
|
||||||
<div className={styles.bookingCodeRememberVisible}>
|
<div className={styles.bookingCodeRememberVisible}>
|
||||||
<CodeRemember
|
<CodeRemember
|
||||||
bookingCodeValue={bookingCode?.value}
|
bookingCodeValue={bookingCode?.value}
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ export function VoucherSkeleton() {
|
|||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
|
|
||||||
const vouchers = intl.formatMessage({ id: "Code / Voucher" })
|
const vouchers = intl.formatMessage({ id: "Code / Voucher" })
|
||||||
const useVouchers = intl.formatMessage({ id: "Use code/voucher" })
|
|
||||||
const addVouchers = intl.formatMessage({ id: "Add code" })
|
|
||||||
const bonus = intl.formatMessage({ id: "Use Bonus Cheque" })
|
const bonus = intl.formatMessage({ id: "Use Bonus Cheque" })
|
||||||
const reward = intl.formatMessage({ id: "Book Reward Night" })
|
const reward = intl.formatMessage({ id: "Book Reward Night" })
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
import { useRouter } from "next/navigation"
|
import { useRouter } from "next/navigation"
|
||||||
import { useEffect, useState, useTransition } from "react"
|
import { useTransition } from "react"
|
||||||
import { Form as FormRAC } from "react-aria-components"
|
import { Form as FormRAC } from "react-aria-components"
|
||||||
import { useFormContext } from "react-hook-form"
|
import { useFormContext } from "react-hook-form"
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export const bookingWidgetSchema = z
|
|||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import styles from "./form.module.css"
|
|||||||
|
|
||||||
import type { SignUpFormProps } from "@/types/components/form/signupForm"
|
import type { SignUpFormProps } from "@/types/components/form/signupForm"
|
||||||
|
|
||||||
export default function SignupForm({ link, subtitle, title }: SignUpFormProps) {
|
export default function SignupForm({ title }: SignUpFormProps) {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const lang = useLang()
|
const lang = useLang()
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
import { useRef } from "react"
|
import { useRef } from "react"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { MembershipLevelEnum } from "@/constants/membershipLevels"
|
|
||||||
import { trpc } from "@/lib/trpc/client"
|
|
||||||
import useDropdownStore from "@/stores/main-menu"
|
import useDropdownStore from "@/stores/main-menu"
|
||||||
|
|
||||||
import { ChevronDownSmallIcon } from "@/components/Icons"
|
import { ChevronDownSmallIcon } from "@/components/Icons"
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ export default function MyPagesMenuContent({
|
|||||||
user,
|
user,
|
||||||
membershipLevel,
|
membershipLevel,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const lang = useLang()
|
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const myPagesMenuContentRef = useTrapFocus()
|
const myPagesMenuContentRef = useTrapFocus()
|
||||||
const { data: myPagesNavigation } = useMyPagesNavigation()
|
const { data: myPagesNavigation } = useMyPagesNavigation()
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import { BreakfastPackageEnum } from "@/types/enums/breakfast"
|
|||||||
|
|
||||||
export default function Receipt({
|
export default function Receipt({
|
||||||
booking,
|
booking,
|
||||||
hotel,
|
|
||||||
room,
|
room,
|
||||||
}: BookingConfirmationReceiptProps) {
|
}: BookingConfirmationReceiptProps) {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
|
|||||||
@@ -22,14 +22,8 @@ export function LinkedReservation({
|
|||||||
}: LinkedReservationProps) {
|
}: LinkedReservationProps) {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const lang = useLang()
|
const lang = useLang()
|
||||||
const {
|
const { checkinDate, checkoutDate, confirmationNumber, adults, children } =
|
||||||
checkinDate,
|
linkedReservation
|
||||||
checkoutDate,
|
|
||||||
confirmationNumber,
|
|
||||||
roomTypeCode,
|
|
||||||
adults,
|
|
||||||
children,
|
|
||||||
} = linkedReservation
|
|
||||||
|
|
||||||
const fromDate = dt(checkinDate).locale(lang)
|
const fromDate = dt(checkinDate).locale(lang)
|
||||||
const toDate = dt(checkoutDate).locale(lang)
|
const toDate = dt(checkoutDate).locale(lang)
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { useIntl } from "react-intl"
|
|||||||
import DateSelect from "@/components/TempDesignSystem/Form/Date"
|
import DateSelect from "@/components/TempDesignSystem/Form/Date"
|
||||||
import Input from "@/components/TempDesignSystem/Form/Input"
|
import Input from "@/components/TempDesignSystem/Form/Input"
|
||||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||||
import useLang from "@/hooks/useLang"
|
|
||||||
|
|
||||||
import styles from "./signup.module.css"
|
import styles from "./signup.module.css"
|
||||||
|
|
||||||
|
|||||||
@@ -3,25 +3,15 @@ import { useIntl } from "react-intl"
|
|||||||
|
|
||||||
import { ChevronDownIcon } from "@/components/Icons"
|
import { ChevronDownIcon } from "@/components/Icons"
|
||||||
import Divider from "@/components/TempDesignSystem/Divider"
|
import Divider from "@/components/TempDesignSystem/Divider"
|
||||||
import Select from "@/components/TempDesignSystem/Form/Select"
|
|
||||||
import TextArea from "@/components/TempDesignSystem/Form/TextArea"
|
import TextArea from "@/components/TempDesignSystem/Form/TextArea"
|
||||||
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
||||||
|
|
||||||
import { ElevatorPreference, FloorPreference } from "./../schema"
|
|
||||||
|
|
||||||
import styles from "./specialRequests.module.css"
|
import styles from "./specialRequests.module.css"
|
||||||
|
|
||||||
export default function SpecialRequests() {
|
export default function SpecialRequests() {
|
||||||
const [isOpen, setIsOpen] = useState(false)
|
const [isOpen, setIsOpen] = useState(false)
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
|
|
||||||
const noPreferenceItem = {
|
|
||||||
value: "",
|
|
||||||
label: intl.formatMessage({
|
|
||||||
id: "No preference",
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleRequests() {
|
function toggleRequests() {
|
||||||
setIsOpen((prevVal) => !prevVal)
|
setIsOpen((prevVal) => !prevVal)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,9 @@ import {
|
|||||||
selectRoomStatus,
|
selectRoomStatus,
|
||||||
} from "@/stores/enter-details/helpers"
|
} from "@/stores/enter-details/helpers"
|
||||||
|
|
||||||
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "@/components/Icons"
|
import { CheckIcon, ChevronDownIcon } from "@/components/Icons"
|
||||||
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
||||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||||
import useScrollToActiveSection from "@/hooks/booking/useScrollToActiveSection"
|
|
||||||
|
|
||||||
import styles from "./sectionAccordion.module.css"
|
import styles from "./sectionAccordion.module.css"
|
||||||
|
|
||||||
|
|||||||
@@ -16,13 +16,7 @@ import { isValidClientSession } from "@/utils/clientSession"
|
|||||||
|
|
||||||
import styles from "./selectedRoomPanel.module.css"
|
import styles from "./selectedRoomPanel.module.css"
|
||||||
|
|
||||||
import type { Room as SelectedRateRoom } from "@/types/components/hotelReservation/selectRate/selectRate"
|
export default function SelectedRoomPanel() {
|
||||||
|
|
||||||
interface SelectedRoomPanelProps {
|
|
||||||
room: SelectedRateRoom
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function SelectedRoomPanel({ room }: SelectedRoomPanelProps) {
|
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const { data: session } = useSession()
|
const { data: session } = useSession()
|
||||||
const isUserLoggedIn = isValidClientSession(session)
|
const isUserLoggedIn = isValidClientSession(session)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default function MultiRoomWrapper({
|
|||||||
)}
|
)}
|
||||||
<div className={classNames}>
|
<div className={classNames}>
|
||||||
<div className={styles.roomPanel}>
|
<div className={styles.roomPanel}>
|
||||||
<SelectedRoomPanel room={bookingRoom} />
|
<SelectedRoomPanel />
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.roomSelectionPanel}>{children}</div>
|
<div className={styles.roomSelectionPanel}>{children}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export default function FullView({
|
|||||||
transition={{ duration: 0.3 }}
|
transition={{ duration: 0.3 }}
|
||||||
className={styles.fullViewImage}
|
className={styles.fullViewImage}
|
||||||
drag="x"
|
drag="x"
|
||||||
onDragEnd={(e, info) => handleSwipe(info.offset.x)}
|
onDragEnd={(_e, info) => handleSwipe(info.offset.x)}
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
alt={image.alt}
|
alt={image.alt}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default function ManagePreferencesButton() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onError: (e) => {
|
onError: () => {
|
||||||
toast.error(
|
toast.error(
|
||||||
intl.formatMessage({
|
intl.formatMessage({
|
||||||
id: "An error occurred trying to manage your preferences, please try again later.",
|
id: "An error occurred trying to manage your preferences, please try again later.",
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ export default function HotelSidePeek({
|
|||||||
additionalHotelData,
|
additionalHotelData,
|
||||||
activeSidePeek,
|
activeSidePeek,
|
||||||
close,
|
close,
|
||||||
showCTA,
|
|
||||||
}: HotelSidePeekProps) {
|
}: HotelSidePeekProps) {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const amenitiesList = hotel.detailedFacilities.filter(
|
const amenitiesList = hotel.detailedFacilities.filter(
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { getName } from "@/lib/trpc/memoizedRequests"
|
|
||||||
|
|
||||||
import { auth } from "@/auth"
|
import { auth } from "@/auth"
|
||||||
import ArrowRight from "@/components/Icons/ArrowRight"
|
import ArrowRight from "@/components/Icons/ArrowRight"
|
||||||
import { ScandicFriends } from "@/components/Levels"
|
import { ScandicFriends } from "@/components/Levels"
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ export default function NewPassword({
|
|||||||
disabled = false,
|
disabled = false,
|
||||||
placeholder = "",
|
placeholder = "",
|
||||||
registerOptions = {},
|
registerOptions = {},
|
||||||
label,
|
|
||||||
visibilityToggleable = true,
|
visibilityToggleable = true,
|
||||||
}: NewPasswordProps) {
|
}: NewPasswordProps) {
|
||||||
const { control } = useFormContext()
|
const { control } = useFormContext()
|
||||||
|
|||||||
@@ -379,7 +379,6 @@
|
|||||||
"No hotels match your filters": "Ingen rum matchede dine filtre.",
|
"No hotels match your filters": "Ingen rum matchede dine filtre.",
|
||||||
"No matching location found": "Der blev ikke fundet nogen matchende placering",
|
"No matching location found": "Der blev ikke fundet nogen matchende placering",
|
||||||
"No membership benefits applied": "No membership benefits applied",
|
"No membership benefits applied": "No membership benefits applied",
|
||||||
"No preference": "Ingen præference",
|
|
||||||
"No prices available": "Ingen tilgængelige priser",
|
"No prices available": "Ingen tilgængelige priser",
|
||||||
"No results": "Ingen resultater",
|
"No results": "Ingen resultater",
|
||||||
"No transactions available": "Ingen tilgængelige transaktioner",
|
"No transactions available": "Ingen tilgængelige transaktioner",
|
||||||
@@ -592,7 +591,6 @@
|
|||||||
"Upgrade your stay": "Opgrader dit ophold",
|
"Upgrade your stay": "Opgrader dit ophold",
|
||||||
"Use Bonus Cheque": "Brug Bonus Cheque",
|
"Use Bonus Cheque": "Brug Bonus Cheque",
|
||||||
"Use bonus cheque": "Brug Bonus Cheque",
|
"Use bonus cheque": "Brug Bonus Cheque",
|
||||||
"Use code/voucher": "Brug kode/voucher",
|
|
||||||
"User information": "Brugeroplysninger",
|
"User information": "Brugeroplysninger",
|
||||||
"VAT": "VAT",
|
"VAT": "VAT",
|
||||||
"VAT amount": "VAT amount",
|
"VAT amount": "VAT amount",
|
||||||
|
|||||||
@@ -380,7 +380,6 @@
|
|||||||
"No hotels match your filters": "Kein Zimmer entspricht Ihren Filtern.",
|
"No hotels match your filters": "Kein Zimmer entspricht Ihren Filtern.",
|
||||||
"No matching location found": "Kein passender Standort gefunden",
|
"No matching location found": "Kein passender Standort gefunden",
|
||||||
"No membership benefits applied": "No membership benefits applied",
|
"No membership benefits applied": "No membership benefits applied",
|
||||||
"No preference": "Keine Präferenz",
|
|
||||||
"No prices available": "Keine Preise verfügbar",
|
"No prices available": "Keine Preise verfügbar",
|
||||||
"No results": "Keine Ergebnisse",
|
"No results": "Keine Ergebnisse",
|
||||||
"No transactions available": "Keine Transaktionen verfügbar",
|
"No transactions available": "Keine Transaktionen verfügbar",
|
||||||
@@ -592,7 +591,6 @@
|
|||||||
"Upgrade your stay": "Werten Sie Ihren Aufenthalt auf",
|
"Upgrade your stay": "Werten Sie Ihren Aufenthalt auf",
|
||||||
"Use Bonus Cheque": "Bonusscheck nutzen",
|
"Use Bonus Cheque": "Bonusscheck nutzen",
|
||||||
"Use bonus cheque": "Bonusscheck nutzen",
|
"Use bonus cheque": "Bonusscheck nutzen",
|
||||||
"Use code/voucher": "Code/Gutschein nutzen",
|
|
||||||
"User information": "Nutzerinformation",
|
"User information": "Nutzerinformation",
|
||||||
"VAT": "VAT",
|
"VAT": "VAT",
|
||||||
"VAT amount": "VAT amount",
|
"VAT amount": "VAT amount",
|
||||||
|
|||||||
@@ -385,7 +385,6 @@
|
|||||||
"No hotels match your filters": "No hotels match your filters",
|
"No hotels match your filters": "No hotels match your filters",
|
||||||
"No matching location found": "No matching location found",
|
"No matching location found": "No matching location found",
|
||||||
"No membership benefits applied": "No membership benefits applied",
|
"No membership benefits applied": "No membership benefits applied",
|
||||||
"No preference": "No preference",
|
|
||||||
"No prices available": "No prices available",
|
"No prices available": "No prices available",
|
||||||
"No results": "No results",
|
"No results": "No results",
|
||||||
"No transactions available": "No transactions available",
|
"No transactions available": "No transactions available",
|
||||||
@@ -598,7 +597,6 @@
|
|||||||
"Upgrade your stay": "Upgrade your stay",
|
"Upgrade your stay": "Upgrade your stay",
|
||||||
"Use Bonus Cheque": "Use Bonus Cheque",
|
"Use Bonus Cheque": "Use Bonus Cheque",
|
||||||
"Use bonus cheque": "Use bonus cheque",
|
"Use bonus cheque": "Use bonus cheque",
|
||||||
"Use code/voucher": "Use code/voucher",
|
|
||||||
"User information": "User information",
|
"User information": "User information",
|
||||||
"VAT": "VAT",
|
"VAT": "VAT",
|
||||||
"VAT amount": "VAT amount",
|
"VAT amount": "VAT amount",
|
||||||
|
|||||||
@@ -379,7 +379,6 @@
|
|||||||
"No hotels match your filters": "Yksikään huone ei vastannut suodattimiasi",
|
"No hotels match your filters": "Yksikään huone ei vastannut suodattimiasi",
|
||||||
"No matching location found": "Vastaavaa sijaintia ei löytynyt",
|
"No matching location found": "Vastaavaa sijaintia ei löytynyt",
|
||||||
"No membership benefits applied": "No membership benefits applied",
|
"No membership benefits applied": "No membership benefits applied",
|
||||||
"No preference": "Ei toivetta",
|
|
||||||
"No prices available": "Hintoja ei ole saatavilla",
|
"No prices available": "Hintoja ei ole saatavilla",
|
||||||
"No results": "Ei tuloksia",
|
"No results": "Ei tuloksia",
|
||||||
"No transactions available": "Ei tapahtumia saatavilla",
|
"No transactions available": "Ei tapahtumia saatavilla",
|
||||||
@@ -592,7 +591,6 @@
|
|||||||
"Upgrade your stay": "Päivitä oleskelusi",
|
"Upgrade your stay": "Päivitä oleskelusi",
|
||||||
"Use Bonus Cheque": "Käytä bonussekkiä",
|
"Use Bonus Cheque": "Käytä bonussekkiä",
|
||||||
"Use bonus cheque": "Käytä bonussekkiä",
|
"Use bonus cheque": "Käytä bonussekkiä",
|
||||||
"Use code/voucher": "Käytä koodia/voucheria",
|
|
||||||
"User information": "Käyttäjän tiedot",
|
"User information": "Käyttäjän tiedot",
|
||||||
"VAT": "VAT",
|
"VAT": "VAT",
|
||||||
"VAT amount": "VAT amount",
|
"VAT amount": "VAT amount",
|
||||||
|
|||||||
@@ -378,7 +378,6 @@
|
|||||||
"No hotels match your filters": "Ingen rom samsvarte med filtrene dine",
|
"No hotels match your filters": "Ingen rom samsvarte med filtrene dine",
|
||||||
"No matching location found": "Fant ingen samsvarende plassering",
|
"No matching location found": "Fant ingen samsvarende plassering",
|
||||||
"No membership benefits applied": "No membership benefits applied",
|
"No membership benefits applied": "No membership benefits applied",
|
||||||
"No preference": "Ingen preferanse",
|
|
||||||
"No prices available": "Ingen priser tilgjengelig",
|
"No prices available": "Ingen priser tilgjengelig",
|
||||||
"No results": "Ingen resultater",
|
"No results": "Ingen resultater",
|
||||||
"No transactions available": "Ingen transaksjoner tilgjengelig",
|
"No transactions available": "Ingen transaksjoner tilgjengelig",
|
||||||
@@ -590,7 +589,6 @@
|
|||||||
"Upgrade your stay": "Oppgrader oppholdet ditt",
|
"Upgrade your stay": "Oppgrader oppholdet ditt",
|
||||||
"Use Bonus Cheque": "Bruk bonussjekk",
|
"Use Bonus Cheque": "Bruk bonussjekk",
|
||||||
"Use bonus cheque": "Bruk bonussjekk",
|
"Use bonus cheque": "Bruk bonussjekk",
|
||||||
"Use code/voucher": "Bruk kode/voucher",
|
|
||||||
"User information": "Brukerinformasjon",
|
"User information": "Brukerinformasjon",
|
||||||
"VAT": "VAT",
|
"VAT": "VAT",
|
||||||
"VAT amount": "VAT amount",
|
"VAT amount": "VAT amount",
|
||||||
|
|||||||
@@ -378,7 +378,6 @@
|
|||||||
"No hotels match your filters": "Inga rum matchade dina filter",
|
"No hotels match your filters": "Inga rum matchade dina filter",
|
||||||
"No matching location found": "Ingen matchande plats hittades",
|
"No matching location found": "Ingen matchande plats hittades",
|
||||||
"No membership benefits applied": "No membership benefits applied",
|
"No membership benefits applied": "No membership benefits applied",
|
||||||
"No preference": "Ingen preferens",
|
|
||||||
"No prices available": "Inga priser tillgängliga",
|
"No prices available": "Inga priser tillgängliga",
|
||||||
"No results": "Inga resultat",
|
"No results": "Inga resultat",
|
||||||
"No transactions available": "Inga transaktioner tillgängliga",
|
"No transactions available": "Inga transaktioner tillgängliga",
|
||||||
@@ -590,7 +589,6 @@
|
|||||||
"Upgrade your stay": "Uppgradera din vistelse",
|
"Upgrade your stay": "Uppgradera din vistelse",
|
||||||
"Use Bonus Cheque": "Använd bonuscheck",
|
"Use Bonus Cheque": "Använd bonuscheck",
|
||||||
"Use bonus cheque": "Använd bonuscheck",
|
"Use bonus cheque": "Använd bonuscheck",
|
||||||
"Use code/voucher": "Använd kod/voucher",
|
|
||||||
"User information": "Användarinformation",
|
"User information": "Användarinformation",
|
||||||
"VAT": "VAT",
|
"VAT": "VAT",
|
||||||
"VAT amount": "VAT amount",
|
"VAT amount": "VAT amount",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const defaultOptions: RequestInit = {
|
|||||||
|
|
||||||
const wrappedFetch = fetchRetry(fetch, {
|
const wrappedFetch = fetchRetry(fetch, {
|
||||||
retries: 3,
|
retries: 3,
|
||||||
retryDelay: function (attempt, error, response) {
|
retryDelay: function (attempt) {
|
||||||
return Math.pow(2, attempt) * 150 // 150, 300, 600
|
return Math.pow(2, attempt) * 150 // 150, 300, 600
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export async function request<T>(
|
|||||||
fetch: cache(async function (url: URL | RequestInfo, params?: RequestInit) {
|
fetch: cache(async function (url: URL | RequestInfo, params?: RequestInit) {
|
||||||
const wrappedFetch = fetchRetry(fetch, {
|
const wrappedFetch = fetchRetry(fetch, {
|
||||||
retries: 3,
|
retries: 3,
|
||||||
retryDelay: function (attempt, error, response) {
|
retryDelay: function (attempt) {
|
||||||
return Math.pow(2, attempt) * 150 // 150, 300, 600
|
return Math.pow(2, attempt) * 150 // 150, 300, 600
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
export type SignUpFormProps = {
|
export type SignUpFormProps = {
|
||||||
link?: { href: string; text: string }
|
|
||||||
subtitle?: string
|
|
||||||
title: string
|
title: string
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user