From 898eccdb93104cd80973d973a99a21ebd3154104 Mon Sep 17 00:00:00 2001 From: Kyle McDonald Date: Mon, 14 Aug 2023 09:49:12 -0500 Subject: [PATCH] Open Graph Image font declaration moved to correct place --- .../01-metadata/opengraph-image.mdx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/02-app/02-api-reference/02-file-conventions/01-metadata/opengraph-image.mdx b/docs/02-app/02-api-reference/02-file-conventions/01-metadata/opengraph-image.mdx index 76fa036fb109a..c467bffd4c739 100644 --- a/docs/02-app/02-api-reference/02-file-conventions/01-metadata/opengraph-image.mdx +++ b/docs/02-app/02-api-reference/02-file-conventions/01-metadata/opengraph-image.mdx @@ -104,13 +104,13 @@ export const size = { export const contentType = 'image/png' -// Font -const interSemiBold = fetch( - new URL('./Inter-SemiBold.ttf', import.meta.url) -).then((res) => res.arrayBuffer()) - // Image generation export default async function Image() { + // Font + const interSemiBold = fetch( + new URL('./Inter-SemiBold.ttf', import.meta.url) + ).then((res) => res.arrayBuffer()) + return new ImageResponse( ( // ImageResponse JSX element @@ -159,15 +159,15 @@ export const size = { height: 630, } -// Font -const interSemiBold = fetch( - new URL('./Inter-SemiBold.ttf', import.meta.url) -).then((res) => res.arrayBuffer()) - export const contentType = 'image/png' // Image generation export default function Image() { + // Font + const interSemiBold = fetch( + new URL('./Inter-SemiBold.ttf', import.meta.url) + ).then((res) => res.arrayBuffer()) + return new ImageResponse( ( // ImageResponse JSX element