From 3e1acfce427531247e67ea852237224eaf4d40e4 Mon Sep 17 00:00:00 2001 From: grin Date: Tue, 27 May 2025 14:23:26 -0400 Subject: [PATCH] fix share page --- src/app/share/[fid]/page.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/share/[fid]/page.tsx b/src/app/share/[fid]/page.tsx index bb2e823..b7e06cc 100644 --- a/src/app/share/[fid]/page.tsx +++ b/src/app/share/[fid]/page.tsx @@ -1,4 +1,4 @@ -import { Metadata } from "next"; +import type { Metadata } from "next"; import { redirect } from "next/navigation"; import { APP_URL, APP_NAME, APP_DESCRIPTION } from "~/lib/constants"; import { getFrameEmbedMetadata } from "~/lib/utils"; @@ -7,8 +7,12 @@ export const revalidate = 300; // This is an example of how to generate a dynamically generated share page based on fid: // Sharing this route e.g. exmaple.com/share/123 will generate a share page for fid 123, // with the image dynamically generated by the opengraph-image API route. -export async function generateMetadata({ params }: { params: { fid: string } }): Promise { - const fid = params.fid; +export async function generateMetadata({ + params, +}: { + params: Promise<{ fid: string }>; +}): Promise { + const { fid } = await params; const imageUrl = `${APP_URL}/api/opengraph-image?fid=${fid}`; return { @@ -27,4 +31,4 @@ export async function generateMetadata({ params }: { params: { fid: string } }): export default function SharePage() { // redirect to home page redirect("/"); -} \ No newline at end of file +}