chore: add no unused vars lint rule

This commit is contained in:
Christian Andolf
2025-02-14 10:24:52 +01:00
parent 1116bdafa8
commit 06d861fb6f
54 changed files with 47 additions and 143 deletions

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
}
}