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 OpengraphImage from 'components/opengraph-image';
|
||||||
import { getPage } from 'lib/medusa';
|
// import { getPage } from 'lib/medusa';
|
||||||
|
|
||||||
export const runtime = 'edge';
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export default async function Image({ params }: { params: { page: string } }) {
|
export default async function Image({ params }: { params: { page: string } }) {
|
||||||
const page = await getPage(params.page);
|
// Medusa doesn't support content pages right now
|
||||||
const title = page.seo?.title || page.title;
|
// 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 });
|
return await OpengraphImage({ title });
|
||||||
}
|
}
|
||||||
|
@ -384,8 +384,8 @@ export async function getCategory(handle: string): Promise<ProductCollection | u
|
|||||||
|
|
||||||
export async function getCategoryProducts(
|
export async function getCategoryProducts(
|
||||||
handle: string,
|
handle: string,
|
||||||
reverse: boolean,
|
reverse?: boolean,
|
||||||
sortKey: string
|
sortKey?: string
|
||||||
): Promise<Product[]> {
|
): Promise<Product[]> {
|
||||||
const res = await medusaRequest({
|
const res = await medusaRequest({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user