This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
import { getPostBySlug } from '@/lib/blog';
|
import { getPostBySlug } from '@/lib/blog';
|
||||||
|
|
||||||
export const runtime = 'edge';
|
export const runtime = 'nodejs';
|
||||||
|
|
||||||
export default async function Image({ params: { locale, slug } }: { params: { locale: string, slug: string } }) {
|
export default async function Image({ params: { locale, slug } }: { params: { locale: string, slug: string } }) {
|
||||||
const post = await getPostBySlug(slug, locale);
|
const post = await getPostBySlug(slug, locale);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { ImageResponse } from 'next/og';
|
import { ImageResponse } from 'next/og';
|
||||||
import { getProductBySlug } from '@/lib/mdx';
|
import { getProductBySlug } from '@/lib/mdx';
|
||||||
|
|
||||||
export const runtime = 'edge';
|
export const runtime = 'nodejs';
|
||||||
|
|
||||||
export default async function Image({ params: { locale, slug } }: { params: { locale: string, slug: string[] } }) {
|
export default async function Image({ params: { locale, slug } }: { params: { locale: string, slug: string } }) {
|
||||||
const productSlug = slug[slug.length - 1];
|
const productSlug = slug;
|
||||||
const product = await getProductBySlug(productSlug, locale);
|
const product = await getProductBySlug(productSlug, locale);
|
||||||
|
|
||||||
if (!product) {
|
if (!product) {
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user