feat(SW-1389): refactor page settings
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { Lang } from "@/constants/languages"
|
||||
|
||||
export const langInput = z.object({ lang: z.nativeEnum(Lang) })
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
import { request } from "@/lib/graphql/request"
|
||||
import { notFound } from "@/server/errors/trpc"
|
||||
import { contentstackBaseProcedure, router } from "@/server/trpc"
|
||||
import { langInput } from "@/server/utils"
|
||||
|
||||
import {
|
||||
generateRefsResponseTag,
|
||||
@@ -26,7 +27,6 @@ import {
|
||||
generateTagsFromSystem,
|
||||
} from "@/utils/generateTag"
|
||||
|
||||
import { langInput } from "./input"
|
||||
import {
|
||||
type ContactConfigData,
|
||||
type CurrentFooterDataRaw,
|
||||
@@ -619,7 +619,7 @@ export const baseQueryRouter = router({
|
||||
siteConfig: contentstackBaseProcedure
|
||||
.input(langInput)
|
||||
.query(async ({ input, ctx }) => {
|
||||
const lang = input?.lang ?? ctx.lang
|
||||
const lang = input.lang ?? ctx.lang
|
||||
|
||||
getSiteConfigRefCounter.add(1, { lang })
|
||||
console.info(
|
||||
|
||||
Reference in New Issue
Block a user