Skip to content

Commit a093b45

Browse files
authored
Fix Vercel preview env (#4197)
1 parent b5d7e19 commit a093b45

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

frontend/src/pages/api/[lang]/event/[slug]/social-card.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { TitleSubtitleCard } from "~/components/social-card-images/title-subtitl
77
import { queryTalk } from "~/types";
88

99
export const config = {
10-
runtime: "edge",
10+
runtime: process.env.VERCEL_ENV === "preview" ? undefined : "edge",
1111
unstable_allowDynamic: ["/node_modules/.pnpm/**"],
1212
};
1313

@@ -19,7 +19,7 @@ const regularFont = fetch(
1919
).then((res) => res.arrayBuffer());
2020
const semiBoldFont = fetch(
2121
new URL(
22-
"../../../../../social-card-font/GeneralSans-Bold.otf",
22+
"../../../../../social-card-font/GeneralSans-Semibold.otf",
2323
import.meta.url,
2424
),
2525
).then((res) => res.arrayBuffer());

frontend/src/pages/api/[lang]/keynotes/[slug]/social-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { TitleSubtitleCard } from "~/components/social-card-images/title-subtitl
77
import { queryTalk } from "~/types";
88

99
export const config = {
10-
runtime: "edge",
10+
runtime: process.env.VERCEL_ENV === "preview" ? undefined : "edge",
1111
unstable_allowDynamic: ["/node_modules/.pnpm/**"],
1212
};
1313

frontend/src/pages/api/[lang]/news/[slug]/social-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { TitleSubtitleCard } from "~/components/social-card-images/title-subtitl
77
import { queryNewsArticle } from "~/types";
88

99
export const config = {
10-
runtime: "edge",
10+
runtime: process.env.VERCEL_ENV === "preview" ? undefined : "edge",
1111
unstable_allowDynamic: ["/node_modules/.pnpm/**"],
1212
};
1313

frontend/src/pages/api/[lang]/social-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { Language } from "~/locale/languages";
88
import { querySocialCard } from "~/types";
99

1010
export const config = {
11-
runtime: "edge",
11+
runtime: process.env.VERCEL_ENV === "preview" ? undefined : "edge",
1212
unstable_allowDynamic: ["/node_modules/.pnpm/**"],
1313
};
1414

-42.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)