feat: get breakfast package from API
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { cookies, headers } from "next/headers"
|
||||
import { type Session } from "next-auth"
|
||||
import { cache } from "react"
|
||||
|
||||
import { Lang } from "@/constants/languages"
|
||||
|
||||
@@ -37,7 +38,7 @@ export function createContextInner(opts: CreateContextOptions) {
|
||||
* This is the actual context you'll use in your router
|
||||
* @link https://trpc.io/docs/context
|
||||
**/
|
||||
export function createContext() {
|
||||
export const createContext = cache(function () {
|
||||
const h = headers()
|
||||
|
||||
const cookie = cookies()
|
||||
@@ -66,6 +67,6 @@ export function createContext() {
|
||||
webToken: webviewTokenCookie?.value,
|
||||
contentType: h.get("x-contenttype")!,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
export type Context = ReturnType<typeof createContext>
|
||||
|
||||
Reference in New Issue
Block a user