* fix(BOOK-607): updated to read from base URL env and contentstack slug instead * made url optional on interface * added url to findBooking query * added the correct (new) link in the confirmation header, add to calendar Approved-by: Erik Tiekstra
26 lines
862 B
TypeScript
26 lines
862 B
TypeScript
import { createEnv } from "@t3-oss/env-nextjs"
|
|
import { z } from "zod"
|
|
|
|
export const env = createEnv({
|
|
/**
|
|
* Due to t3-env only checking typeof window === "undefined"
|
|
* and Netlify running Deno, window is never "undefined"
|
|
* https://github.com/t3-oss/t3-env/issues/154
|
|
*/
|
|
isServer: typeof window === "undefined" || "Deno" in window,
|
|
server: {
|
|
PUBLIC_URL: z.string().default(""),
|
|
GOOGLE_STATIC_MAP_KEY: z.string(),
|
|
GOOGLE_STATIC_MAP_SIGNATURE_SECRET: z.string(),
|
|
GOOGLE_DYNAMIC_MAP_ID: z.string(),
|
|
},
|
|
emptyStringAsUndefined: true,
|
|
runtimeEnv: {
|
|
PUBLIC_URL: process.env.NEXT_PUBLIC_PUBLIC_URL,
|
|
GOOGLE_STATIC_MAP_KEY: process.env.GOOGLE_STATIC_MAP_KEY,
|
|
GOOGLE_STATIC_MAP_SIGNATURE_SECRET:
|
|
process.env.GOOGLE_STATIC_MAP_SIGNATURE_SECRET,
|
|
GOOGLE_DYNAMIC_MAP_ID: process.env.GOOGLE_DYNAMIC_MAP_ID,
|
|
},
|
|
})
|