This commit is contained in:
Lee Robinson 2024-04-17 21:36:02 -05:00
parent 59e9eb7dc2
commit ddc7d67bae
5 changed files with 2 additions and 8 deletions

View File

@ -1,8 +1,6 @@
import OpengraphImage from 'components/opengraph-image'; import OpengraphImage from 'components/opengraph-image';
import { getPage } from 'lib/shopify'; import { getPage } from 'lib/shopify';
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); const page = await getPage(params.page);
const title = page.seo?.title || page.title; const title = page.seo?.title || page.title;

View File

@ -1,8 +1,6 @@
import { revalidate } from 'lib/shopify'; import { revalidate } from 'lib/shopify';
import { NextRequest, NextResponse } from 'next/server'; import { NextRequest, NextResponse } from 'next/server';
export const runtime = 'edge';
export async function POST(req: NextRequest): Promise<NextResponse> { export async function POST(req: NextRequest): Promise<NextResponse> {
return revalidate(req); return revalidate(req);
} }

View File

@ -1,7 +1,5 @@
import OpengraphImage from 'components/opengraph-image'; import OpengraphImage from 'components/opengraph-image';
export const runtime = 'edge';
export default async function Image() { export default async function Image() {
return await OpengraphImage(); return await OpengraphImage();
} }

View File

@ -1,8 +1,6 @@
import OpengraphImage from 'components/opengraph-image'; import OpengraphImage from 'components/opengraph-image';
import { getCollection } from 'lib/shopify'; import { getCollection } from 'lib/shopify';
export const runtime = 'edge';
export default async function Image({ params }: { params: { collection: string } }) { export default async function Image({ params }: { params: { collection: string } }) {
const collection = await getCollection(params.collection); const collection = await getCollection(params.collection);
const title = collection?.seo?.title || collection?.title; const title = collection?.seo?.title || collection?.title;

View File

@ -11,6 +11,8 @@ const baseUrl = process.env.NEXT_PUBLIC_VERCEL_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: 'http://localhost:3000'; : 'http://localhost:3000';
export const dynamic = 'force-dynamic';
export default async function sitemap(): Promise<MetadataRoute.Sitemap> { export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
validateEnvironmentVariables(); validateEnvironmentVariables();