Adds documentation on how to configure Next.js Commerce and Shopify (#974)

This commit is contained in:
Michael Novotny
2023-04-20 05:46:35 -05:00
committed by GitHub
parent e9a26c2935
commit 67a192eba8
8 changed files with 220 additions and 33 deletions

View File

@@ -1,5 +1,4 @@
import { ImageResponse } from '@vercel/og';
import { SITE_NAME } from 'lib/constants';
import { NextRequest } from 'next/server';
export const runtime = 'edge';
@@ -18,7 +17,9 @@ export async function GET(req: NextRequest): Promise<Response | ImageResponse> {
const { searchParams } = new URL(req.url);
const title = searchParams.has('title') ? searchParams.get('title')?.slice(0, 100) : SITE_NAME;
const title = searchParams.has('title')
? searchParams.get('title')?.slice(0, 100)
: process.env.SITE_NAME;
return new ImageResponse(
(