mirror of
https://github.com/vercel/commerce.git
synced 2025-08-13 04:11:23 +00:00
.github
.husky
.vscode
app
(cms)
[...cms]
layout.tsx
opengraph-image.tsx
api
product
search
error.tsx
favicon.ico
globals.css
layout.tsx
opengraph-image.tsx
page.tsx
robots.ts
sitemap.ts
components
e2e
fonts
lib
.env.example
.eslintrc.js
.gitignore
.nvmrc
.prettierignore
README.md
license.md
next.config.js
package.json
playwright.config.ts
pnpm-lock.yaml
postcss.config.js
prettier.config.js
tailwind.config.js
tsconfig.json
12 lines
357 B
TypeScript
12 lines
357 B
TypeScript
import OpengraphImage from 'components/opengraph-image';
|
|
import { getPage } from 'lib/shopware';
|
|
|
|
export const runtime = 'edge';
|
|
|
|
export default async function Image({ params }: { params: { page: string } }) {
|
|
const page = await getPage(params.page);
|
|
const title = page ? page.seo?.title || page.title : '';
|
|
|
|
return await OpengraphImage({ title });
|
|
}
|