mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 14:06:59 +00:00
fix: opengraph image
This commit is contained in:
parent
ae2aecfb11
commit
519b40cf12
@ -1,11 +1,13 @@
|
||||
import OpengraphImage from 'components/opengraph-image';
|
||||
import { getPage } from 'lib/medusa';
|
||||
// import { getPage } from 'lib/medusa';
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
export default async function Image({ params }: { params: { page: string } }) {
|
||||
const page = await getPage(params.page);
|
||||
const title = page.seo?.title || page.title;
|
||||
// Medusa doesn't support content pages right now
|
||||
// const page = await getPage(params.page);
|
||||
// const title = page.seo?.title || page.title;
|
||||
const title = process.env.SITE_NAME || 'Medusa Store';
|
||||
|
||||
return await OpengraphImage({ title });
|
||||
}
|
||||
|
@ -384,8 +384,8 @@ export async function getCategory(handle: string): Promise<ProductCollection | u
|
||||
|
||||
export async function getCategoryProducts(
|
||||
handle: string,
|
||||
reverse: boolean,
|
||||
sortKey: string
|
||||
reverse?: boolean,
|
||||
sortKey?: string
|
||||
): Promise<Product[]> {
|
||||
const res = await medusaRequest({
|
||||
method: 'GET',
|
||||
|
Loading…
x
Reference in New Issue
Block a user