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:
Christian Andolf
2025-02-17 09:54:33 +00:00
54 changed files with 47 additions and 143 deletions

View File

@@ -3,6 +3,7 @@
"plugins": ["simple-import-sort", "@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"rules": {
"no-unused-vars": "off",
"react/function-component-definition": "error",
"simple-import-sort/imports": [
"error",
@@ -59,6 +60,18 @@
"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
}
]
}
}

View File

@@ -11,7 +11,6 @@ import {
import { serverClient } from "@/lib/trpc/server"
import PaymentCallback from "@/components/HotelReservation/EnterDetails/Payment/PaymentCallback"
import { trackPaymentEvent } from "@/utils/tracking"
import type { LangParams, PageArgs } from "@/types/params"
@@ -62,7 +61,7 @@ export default async function PaymentCallbackPage({
? error.errorCode.toString()
: PaymentErrorCodeEnum.Failed.toString()
)
} catch (error) {
} catch {
console.error(
`[payment-callback] failed to get booking status for ${confirmationNumber}, status: ${status}`
)

View File

@@ -1,4 +1,3 @@
import { notFound } from "next/navigation"
import { Suspense } from "react"
import { SelectHotelMapContainer } from "@/components/HotelReservation/SelectHotel/SelectHotelMap/SelectHotelMapContainer"
@@ -6,8 +5,6 @@ import { SelectHotelMapContainerSkeleton } from "@/components/HotelReservation/S
import { MapContainer } from "@/components/MapContainer"
import { setLang } from "@/i18n/serverContext"
import { getHotelSearchDetails } from "../../utils"
import styles from "./page.module.css"
import type { AlternativeHotelsSearchParams } from "@/types/components/hotelReservation/selectHotel/selectHotelSearchParams"

View File

@@ -3,7 +3,6 @@ import { beforeAll, describe, expect, it } from "@jest/globals"
import { getValidFromDate, getValidToDate } from "./getValidDates"
const NOW = new Date("2020-10-01T00:00:00Z")
let originalTz: string | undefined
describe("getValidFromDate", () => {
beforeAll(() => {

View File

@@ -62,7 +62,7 @@ export default async function CurrentContentPage({
<Tracking pageData={trackingData} />
</>
)
} catch (err) {
} catch {
return notFound()
}
}

View File

@@ -12,7 +12,6 @@ import type { LangParams, PageArgs, SearchParams } from "@/types/params"
export default async function Page({
searchParams,
params,
}: PageArgs<LangParams> & SearchParams<{ errorCode?: "dateOfBirthMismatch" }>) {
const intl = await getIntl()

View File

@@ -3,7 +3,6 @@ import { ArrowLeft } from "react-feather"
import { overview as profileOverview } from "@/constants/routes/myPages"
import Image from "@/components/Image"
import { ProtectedLayout } from "@/components/ProtectedLayout"
import Link from "@/components/TempDesignSystem/Link"
import { getIntl } from "@/i18n"
import background from "@/public/_static/img/partner/sas/sas_x_scandic_airplane_window_background.jpg"

View File

@@ -3,7 +3,6 @@ import React from "react"
import { getProfileSafely } from "@/lib/trpc/memoizedRequests"
import { AlreadyLinkedError } from "../components/AlreadyLinkedError"
import { SASModal } from "../components/SASModal"
import { LinkAccountForm } from "./LinkAccountForm"

View File

@@ -7,11 +7,7 @@ import { getIntl } from "@/i18n"
import { SASModal } from "../../components/SASModal"
import type { LangParams, PageArgs } from "@/types/params"
export default async function SASxScandicLinkPage({
params,
}: PageArgs<LangParams>) {
export default async function SASxScandicLinkPage() {
const intl = await getIntl()
return (

View File

@@ -1,5 +1,5 @@
import { cookies } from "next/headers"
import { redirect, RedirectType } from "next/navigation"
import { redirect } from "next/navigation"
import { z } from "zod"
import { serverClient } from "@/lib/trpc/server"
@@ -8,7 +8,9 @@ import { getIntl } from "@/i18n"
import { safeTry } from "@/utils/safeTry"
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 { Lang } from "@/constants/languages"
@@ -125,7 +127,7 @@ function verifyTokenValidity(token: string | undefined) {
const decoded = JSON.parse(atob(token.split(".")[1]))
const expiry = decoded.exp * 1000
return Date.now() < expiry
} catch (error) {
} catch {
return false
}
}

View File

@@ -47,7 +47,7 @@ export default async function ContentTypePage({
)
default:
const u: never = user
console.log(`[webview:page] unhandled user loading error`)
console.log("[webview:page] unhandled user loading error", u)
}
}

View File

@@ -1,5 +1,3 @@
import { env } from "process"
import { Lang } from "@/constants/languages"
import { profile } from "@/constants/routes/myPages"
import { serverClient } from "@/lib/trpc/server"

View File

@@ -53,7 +53,7 @@ export async function POST(request: NextRequest) {
let tag = ""
if (content_type.uid === "hotel_page") {
const tag = generateHotelUrlTag(locale, entry.hotel_page_id)
tag = generateHotelUrlTag(locale, entry.hotel_page_id)
} else {
console.error(
`Invalid content_type, received ${content_type.uid}, expected "hotel_page"`

View File

@@ -1,7 +1,6 @@
"use client"
import { useState } from "react"
import { useIntl } from "react-intl"
import JsonToHtml from "@/components/JsonToHtml"
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"
export default function AccordionSection({ accordion, title }: AccordionProps) {
const intl = useIntl()
const showToggleButton = accordion.length > 5
const [allAccordionsVisible, setAllAccordionsVisible] =
useState(!showToggleButton)

View File

@@ -12,11 +12,6 @@ export default async function HowItWorks({
firstItem,
}: HowItWorksProps) {
const intl = await getIntl()
const displayHeader = !!(
dynamic_content.link ||
dynamic_content.subtitle ||
dynamic_content.title
)
return (
<SectionWrapper dynamic_content={dynamic_content} firstItem={firstItem}>
<section className={styles.container}>

View File

@@ -10,16 +10,7 @@ import Pagination from "@/components/MyPages/Pagination"
import ClientTable from "./ClientTable"
import type { Transactions } from "@/types/components/myPages/myPage/earnAndBurn"
export default function TransactionTable({
initialJourneyTransactions,
}: {
initialJourneyTransactions: {
data: { transactions: Transactions }
meta: { totalPages: number }
}
}) {
export default function TransactionTable() {
const limit = 5
const [page, setPage] = useState(1)
const { data, isFetching, isLoading } =
@@ -29,8 +20,6 @@ export default function TransactionTable({
page,
},
{
// TODO: fix the initial data issues on page load
// initialData: initialJourneyTransactions,
placeholderData: keepPreviousData,
}
)

View File

@@ -1,18 +1,5 @@
import { serverClient } from "@/lib/trpc/server"
import ClientJourney from "./Client"
export default async function JourneyTable() {
const initialJourneyTransactions =
await serverClient().user.transaction.friendTransactions({
page: 1,
limit: 5,
})
if (!initialJourneyTransactions?.data) {
return null
}
return (
<ClientJourney initialJourneyTransactions={initialJourneyTransactions} />
)
return <ClientJourney />
}

View File

@@ -4,8 +4,6 @@ import { createContext, useCallback, useContext, useEffect } from "react"
import { trpc } from "@/lib/trpc/client"
import useLang from "@/hooks/useLang"
import type { RedeemFlowContext } from "@/types/components/myPages/myPage/accountPage"
import type { RewardWithRedeem } from "@/server/routers/contentstack/reward/output"
@@ -27,7 +25,6 @@ export default function useRedeemFlow() {
timeRemaining,
setTimeRemaining,
} = useContext(RedeemContext)
const lang = useLang()
const update = trpc.contentstack.rewards.redeem.useMutation<{
rewards: RewardWithRedeem[]

View File

@@ -53,7 +53,6 @@ function getIconForRewardId(rewardId: RewardId): IconName {
return IconName.GiftOpen
default: {
const unhandledRewardId: never = rewardId
return IconName.GiftOpen
}
}

View File

@@ -1,7 +1,6 @@
"use client"
import { useState } from "react"
import { useIntl } from "react-intl"
import { dt } from "@/lib/dt"
@@ -19,7 +18,6 @@ import type { StayCardProps } from "@/types/components/myPages/stays/stayCard"
export default function StayCard({ stay }: StayCardProps) {
const lang = useLang()
const intl = useIntl()
// TODO: Temporary loading. Remove when current web is deleted.
const [loading, setLoading] = useState(false)

View File

@@ -25,7 +25,7 @@ export default function Marker({
properties,
onMarkerClick,
}: MarkerProps) {
const [markerRef, marker] = useAdvancedMarkerRef()
const [markerRef] = useAdvancedMarkerRef()
const handleClick = useCallback(() => {
if (onMarkerClick) {
onMarkerClick(position, properties)

View File

@@ -1,11 +1,8 @@
import { activities } from "@/constants/routes/hotelPageParams"
import Button from "@/components/TempDesignSystem/Button"
import Link from "@/components/TempDesignSystem/Link"
import SidePeek from "@/components/TempDesignSystem/SidePeek"
import Preamble from "@/components/TempDesignSystem/Text/Preamble"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
import styles from "./activities.module.css"
@@ -16,7 +13,6 @@ export default async function ActivitiesSidePeek({
sidepeekCTA,
sidepeekSlug,
}: ActivitiesSidePeekProps) {
const lang = getLang()
const intl = await getIntl()
const { href, preamble } = contentPage
return (

View File

@@ -19,8 +19,6 @@ import type { ReactNode } from "react"
import { DropdownTypeEnum } from "@/types/components/dropdown/dropdown"
export default function MyPagesMobileDropdown() {
const { data: myPagesNavigation } = useMyPagesNavigation()
const intl = useIntl()
const { toggleDropdown, isMyPagesMobileMenuOpen } = useDropdownStore()

View File

@@ -89,7 +89,7 @@ export async function TopMenuSkeleton() {
<div className={styles.topMenu}>
<div className={styles.container}>
<ul className={styles.list}>
{links.map((link, i) => (
{links.map((_link, i) => (
<li key={i} className={styles.skeletonWrapper}>
<SkeletonShimmer width="100px" height="16px" />
</li>

View File

@@ -1,7 +1,7 @@
"use client"
import { usePathname, useSearchParams } from "next/navigation"
import { useEffect, useState } from "react"
import { useEffect } from "react"
import type {
SiteSectionObject,
@@ -19,7 +19,7 @@ function createPageObject(trackingData: TrackingData) {
.filter((seg: string) => seg)
function getSiteSections(segments: string[]): SiteSectionObject {
/*
/*
Adobe expects the properties sitesection1 - sitessection6, hence the for-loop below
The segments ['explore-scandic', 'wifi'] should result in:
{
@@ -29,7 +29,7 @@ function createPageObject(trackingData: TrackingData) {
sitesection4: "explore-scandic|wifi||",
sitesection5: "explore-scandic|wifi|||",
sitesection6: "explore-scandic|wifi||||",
}
}
*/
const sitesections = {} as SiteSectionObject
for (let i = 0; i < 6; i++) {

View File

@@ -7,10 +7,8 @@ import type { BookingWidgetSchema } from "@/types/components/bookingWidget"
export default function TabletCodeInput({
updateValue,
defaultValue,
}: {
updateValue: (val: string) => void
defaultValue?: string
}) {
const intl = useIntl()
const { register } = useFormContext<BookingWidgetSchema>()

View File

@@ -108,7 +108,7 @@ export default function BookingCode() {
<Checkbox
checked={!!bookingCode?.value}
{...register("bookingCode.flag", {
onChange: function (e) {
onChange: function () {
if (bookingCode?.value || isOpen) {
setValue("bookingCode.flag", true)
}
@@ -128,10 +128,7 @@ export default function BookingCode() {
<Dialog>
{({ close }) => (
<div className={styles.popover}>
<TabletCodeInput
updateValue={updateBookingCodeFormValue}
defaultValue={bookingCode?.value}
/>
<TabletCodeInput updateValue={updateBookingCodeFormValue} />
<div className={styles.bookingCodeRememberVisible}>
<CodeRemember
bookingCodeValue={bookingCode?.value}

View File

@@ -70,8 +70,6 @@ export function VoucherSkeleton() {
const intl = useIntl()
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 reward = intl.formatMessage({ id: "Book Reward Night" })

View File

@@ -1,6 +1,6 @@
"use client"
import { useRouter } from "next/navigation"
import { useEffect, useState, useTransition } from "react"
import { useTransition } from "react"
import { Form as FormRAC } from "react-aria-components"
import { useFormContext } from "react-hook-form"

View File

@@ -82,7 +82,7 @@ export const bookingWidgetSchema = z
default:
return false
}
} catch (error) {
} catch {
return false
}
},

View File

@@ -32,7 +32,7 @@ import styles from "./form.module.css"
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 router = useRouter()
const lang = useLang()

View File

@@ -3,8 +3,6 @@
import { useRef } from "react"
import { useIntl } from "react-intl"
import { MembershipLevelEnum } from "@/constants/membershipLevels"
import { trpc } from "@/lib/trpc/client"
import useDropdownStore from "@/stores/main-menu"
import { ChevronDownSmallIcon } from "@/components/Icons"

View File

@@ -25,7 +25,6 @@ export default function MyPagesMenuContent({
user,
membershipLevel,
}: Props) {
const lang = useLang()
const intl = useIntl()
const myPagesMenuContentRef = useTrapFocus()
const { data: myPagesNavigation } = useMyPagesNavigation()

View File

@@ -24,7 +24,6 @@ import { BreakfastPackageEnum } from "@/types/enums/breakfast"
export default function Receipt({
booking,
hotel,
room,
}: BookingConfirmationReceiptProps) {
const intl = useIntl()

View File

@@ -22,14 +22,8 @@ export function LinkedReservation({
}: LinkedReservationProps) {
const intl = useIntl()
const lang = useLang()
const {
checkinDate,
checkoutDate,
confirmationNumber,
roomTypeCode,
adults,
children,
} = linkedReservation
const { checkinDate, checkoutDate, confirmationNumber, adults, children } =
linkedReservation
const fromDate = dt(checkinDate).locale(lang)
const toDate = dt(checkoutDate).locale(lang)

View File

@@ -7,7 +7,6 @@ import { useIntl } from "react-intl"
import DateSelect from "@/components/TempDesignSystem/Form/Date"
import Input from "@/components/TempDesignSystem/Form/Input"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import useLang from "@/hooks/useLang"
import styles from "./signup.module.css"

View File

@@ -3,25 +3,15 @@ import { useIntl } from "react-intl"
import { ChevronDownIcon } from "@/components/Icons"
import Divider from "@/components/TempDesignSystem/Divider"
import Select from "@/components/TempDesignSystem/Form/Select"
import TextArea from "@/components/TempDesignSystem/Form/TextArea"
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
import { ElevatorPreference, FloorPreference } from "./../schema"
import styles from "./specialRequests.module.css"
export default function SpecialRequests() {
const [isOpen, setIsOpen] = useState(false)
const intl = useIntl()
const noPreferenceItem = {
value: "",
label: intl.formatMessage({
id: "No preference",
}),
}
function toggleRequests() {
setIsOpen((prevVal) => !prevVal)
}
@@ -43,7 +33,7 @@ export default function SpecialRequests() {
</button>
<div className={styles.content}>
<div className={styles.contentWrapper}>
{/*
{/*
TODO: Hiding because API is not ready for this yet (https://scandichotels.atlassian.net/browse/SW-1497). Add back in when API is ready.

View File

@@ -10,10 +10,9 @@ import {
selectRoomStatus,
} 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 Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
import useScrollToActiveSection from "@/hooks/booking/useScrollToActiveSection"
import styles from "./sectionAccordion.module.css"

View File

@@ -16,13 +16,7 @@ import { isValidClientSession } from "@/utils/clientSession"
import styles from "./selectedRoomPanel.module.css"
import type { Room as SelectedRateRoom } from "@/types/components/hotelReservation/selectRate/selectRate"
interface SelectedRoomPanelProps {
room: SelectedRateRoom
}
export default function SelectedRoomPanel({ room }: SelectedRoomPanelProps) {
export default function SelectedRoomPanel() {
const intl = useIntl()
const { data: session } = useSession()
const isUserLoggedIn = isValidClientSession(session)

View File

@@ -71,7 +71,7 @@ export default function MultiRoomWrapper({
)}
<div className={classNames}>
<div className={styles.roomPanel}>
<SelectedRoomPanel room={bookingRoom} />
<SelectedRoomPanel />
</div>
<div className={styles.roomSelectionPanel}>{children}</div>
</div>

View File

@@ -86,7 +86,7 @@ export default function FullView({
transition={{ duration: 0.3 }}
className={styles.fullViewImage}
drag="x"
onDragEnd={(e, info) => handleSwipe(info.offset.x)}
onDragEnd={(_e, info) => handleSwipe(info.offset.x)}
>
<Image
alt={image.alt}

View File

@@ -25,7 +25,7 @@ export default function ManagePreferencesButton() {
)
}
},
onError: (e) => {
onError: () => {
toast.error(
intl.formatMessage({
id: "An error occurred trying to manage your preferences, please try again later.",

View File

@@ -22,7 +22,6 @@ export default function HotelSidePeek({
additionalHotelData,
activeSidePeek,
close,
showCTA,
}: HotelSidePeekProps) {
const intl = useIntl()
const amenitiesList = hotel.detailedFacilities.filter(
@@ -87,7 +86,7 @@ export default function HotelSidePeek({
</div>
{/* TODO: handle linking to Hotel Page */}
{/* {showCTA && (
{/* {showCTA && (
<Button theme="base" intent="secondary" size="large">
Read more about the hotel
</Button>

View File

@@ -1,5 +1,3 @@
import { getName } from "@/lib/trpc/memoizedRequests"
import { auth } from "@/auth"
import ArrowRight from "@/components/Icons/ArrowRight"
import { ScandicFriends } from "@/components/Levels"

View File

@@ -29,7 +29,6 @@ export default function NewPassword({
disabled = false,
placeholder = "",
registerOptions = {},
label,
visibilityToggleable = true,
}: NewPasswordProps) {
const { control } = useFormContext()

View File

@@ -379,7 +379,6 @@
"No hotels match your filters": "Ingen rum matchede dine filtre.",
"No matching location found": "Der blev ikke fundet nogen matchende placering",
"No membership benefits applied": "No membership benefits applied",
"No preference": "Ingen præference",
"No prices available": "Ingen tilgængelige priser",
"No results": "Ingen resultater",
"No transactions available": "Ingen tilgængelige transaktioner",
@@ -592,7 +591,6 @@
"Upgrade your stay": "Opgrader dit ophold",
"Use Bonus Cheque": "Brug Bonus Cheque",
"Use bonus cheque": "Brug Bonus Cheque",
"Use code/voucher": "Brug kode/voucher",
"User information": "Brugeroplysninger",
"VAT": "VAT",
"VAT amount": "VAT amount",

View File

@@ -380,7 +380,6 @@
"No hotels match your filters": "Kein Zimmer entspricht Ihren Filtern.",
"No matching location found": "Kein passender Standort gefunden",
"No membership benefits applied": "No membership benefits applied",
"No preference": "Keine Präferenz",
"No prices available": "Keine Preise verfügbar",
"No results": "Keine Ergebnisse",
"No transactions available": "Keine Transaktionen verfügbar",
@@ -592,7 +591,6 @@
"Upgrade your stay": "Werten Sie Ihren Aufenthalt auf",
"Use Bonus Cheque": "Bonusscheck nutzen",
"Use bonus cheque": "Bonusscheck nutzen",
"Use code/voucher": "Code/Gutschein nutzen",
"User information": "Nutzerinformation",
"VAT": "VAT",
"VAT amount": "VAT amount",

View File

@@ -385,7 +385,6 @@
"No hotels match your filters": "No hotels match your filters",
"No matching location found": "No matching location found",
"No membership benefits applied": "No membership benefits applied",
"No preference": "No preference",
"No prices available": "No prices available",
"No results": "No results",
"No transactions available": "No transactions available",
@@ -598,7 +597,6 @@
"Upgrade your stay": "Upgrade your stay",
"Use Bonus Cheque": "Use Bonus Cheque",
"Use bonus cheque": "Use bonus cheque",
"Use code/voucher": "Use code/voucher",
"User information": "User information",
"VAT": "VAT",
"VAT amount": "VAT amount",

View File

@@ -379,7 +379,6 @@
"No hotels match your filters": "Yksikään huone ei vastannut suodattimiasi",
"No matching location found": "Vastaavaa sijaintia ei löytynyt",
"No membership benefits applied": "No membership benefits applied",
"No preference": "Ei toivetta",
"No prices available": "Hintoja ei ole saatavilla",
"No results": "Ei tuloksia",
"No transactions available": "Ei tapahtumia saatavilla",
@@ -592,7 +591,6 @@
"Upgrade your stay": "Päivitä oleskelusi",
"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",
"VAT": "VAT",
"VAT amount": "VAT amount",

View File

@@ -378,7 +378,6 @@
"No hotels match your filters": "Ingen rom samsvarte med filtrene dine",
"No matching location found": "Fant ingen samsvarende plassering",
"No membership benefits applied": "No membership benefits applied",
"No preference": "Ingen preferanse",
"No prices available": "Ingen priser tilgjengelig",
"No results": "Ingen resultater",
"No transactions available": "Ingen transaksjoner tilgjengelig",
@@ -590,7 +589,6 @@
"Upgrade your stay": "Oppgrader oppholdet ditt",
"Use Bonus Cheque": "Bruk bonussjekk",
"Use bonus cheque": "Bruk bonussjekk",
"Use code/voucher": "Bruk kode/voucher",
"User information": "Brukerinformasjon",
"VAT": "VAT",
"VAT amount": "VAT amount",

View File

@@ -378,7 +378,6 @@
"No hotels match your filters": "Inga rum matchade dina filter",
"No matching location found": "Ingen matchande plats hittades",
"No membership benefits applied": "No membership benefits applied",
"No preference": "Ingen preferens",
"No prices available": "Inga priser tillgängliga",
"No results": "Inga resultat",
"No transactions available": "Inga transaktioner tillgängliga",
@@ -590,7 +589,6 @@
"Upgrade your stay": "Uppgradera din vistelse",
"Use Bonus Cheque": "Använd bonuscheck",
"Use bonus cheque": "Använd bonuscheck",
"Use code/voucher": "Använd kod/voucher",
"User information": "Användarinformation",
"VAT": "VAT",
"VAT amount": "VAT amount",

View File

@@ -22,7 +22,7 @@ const defaultOptions: RequestInit = {
const wrappedFetch = fetchRetry(fetch, {
retries: 3,
retryDelay: function (attempt, error, response) {
retryDelay: function (attempt) {
return Math.pow(2, attempt) * 150 // 150, 300, 600
},
})

View File

@@ -27,7 +27,7 @@ export async function request<T>(
fetch: cache(async function (url: URL | RequestInfo, params?: RequestInit) {
const wrappedFetch = fetchRetry(fetch, {
retries: 3,
retryDelay: function (attempt, error, response) {
retryDelay: function (attempt) {
return Math.pow(2, attempt) * 150 // 150, 300, 600
},
})

View File

@@ -1,5 +1,3 @@
export type SignUpFormProps = {
link?: { href: string; text: string }
subtitle?: string
title: string
}