Merged in feat/sw-2866-move-partners-router-to-trpc-package (pull request #2414)
feat(sw-2866): Move partners router to trpc package * Add eslint to trpc package * Apply lint rules * Use direct imports from trpc package * Add lint-staged config to trpc * Move lang enum to common * Restructure trpc package folder structure * WIP first step * update internal imports in trpc * 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 * Merge branch 'master' into feat/sw-2866-move-partners-router-to-trpc-package Approved-by: Linus Flood
This commit is contained in:
@@ -3,11 +3,12 @@ import { redirect } from "next/navigation"
|
||||
import { z } from "zod"
|
||||
|
||||
import { safeTry } from "@scandic-hotels/common/utils/safeTry"
|
||||
import { SAS_TOKEN_STORAGE_KEY } from "@scandic-hotels/trpc/constants/partnerSAS"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { SAS_TOKEN_STORAGE_KEY, stateSchema } from "../sasUtils"
|
||||
import { stateSchema } from "../sasUtils"
|
||||
|
||||
import type { NextRequest } from "next/server"
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@ import Loading from "./loading"
|
||||
|
||||
import styles from "./OneTimePasswordForm.module.css"
|
||||
|
||||
import type { RequestOtpError } from "@/server/routers/partners/sas/otp/request/requestOtpError"
|
||||
import type { RequestOtpError } from "@scandic-hotels/trpc/routers/partners/sas/otp/request/requestOtpError"
|
||||
|
||||
import type { OtpError } from "./page"
|
||||
|
||||
type Redirect = { url: string; type?: "replace" | "push" }
|
||||
|
||||
@@ -3,13 +3,16 @@ import { redirect } from "next/navigation"
|
||||
import { z } from "zod"
|
||||
|
||||
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"
|
||||
|
||||
import { SAS_TOKEN_STORAGE_KEY, SAS_TRANSFER_POINT_KEY } from "../sasUtils"
|
||||
import OneTimePasswordForm, {
|
||||
type OnSubmitHandler,
|
||||
} from "./OneTimePasswordForm"
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { z } from "zod"
|
||||
|
||||
export const SAS_TOKEN_STORAGE_KEY = "sas-x-scandic-token"
|
||||
export const SAS_TRANSFER_POINT_KEY = "sas-x-scandic-eb-points"
|
||||
|
||||
export const stateSchema = z.object({
|
||||
intent: z.enum(["link", "unlink", "transfer"]),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user