From 4bc1e51860a27801b98418b24fefd193a03d170a Mon Sep 17 00:00:00 2001 From: Maximilian Kaske <56969857+mxkaske@users.noreply.github.com> Date: Sun, 21 Jan 2024 10:03:46 +0100 Subject: [PATCH] fix: og bar limits (#585) --- apps/web/src/app/api/og/route.tsx | 7 ++----- apps/web/src/app/play/layout.tsx | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/web/src/app/api/og/route.tsx b/apps/web/src/app/api/og/route.tsx index 6341bd8d..a1e2b559 100644 --- a/apps/web/src/app/api/og/route.tsx +++ b/apps/web/src/app/api/og/route.tsx @@ -17,8 +17,6 @@ const size = { height: 630, }; -const LIMIT = 40; - const interRegular = fetch( new URL("../../../public/fonts/Inter-Regular.ttf", import.meta.url), ).then((res) => res.arrayBuffer()); @@ -53,7 +51,6 @@ export async function GET(req: Request) { (monitorId && (await getMonitorListData({ monitorId, - limit: LIMIT, timezone, }))) || []; @@ -93,7 +90,7 @@ export async function GET(req: Request) {
{/* Empty State */} - {new Array(LIMIT).fill(null).map((_, i) => { + {new Array(data.length).fill(null).map((_, i) => { return (
-

{LIMIT} days ago

+

{data.length} days ago

today

diff --git a/apps/web/src/app/play/layout.tsx b/apps/web/src/app/play/layout.tsx index 88989647..d845a1c4 100644 --- a/apps/web/src/app/play/layout.tsx +++ b/apps/web/src/app/play/layout.tsx @@ -12,11 +12,9 @@ export const metadata: Metadata = { ...defaultMetadata, twitter: { ...twitterMetadata, - images: [`/api/og?monitorId=1`], }, openGraph: { ...ogMetadata, - images: [`/api/og?monitorId=1`], }, }; -- 2.51.2