diff --git a/packages/nextjs/app/api/grants/review/route.tsx b/packages/nextjs/app/api/grants/review/route.tsx index 7872c93..a708102 100644 --- a/packages/nextjs/app/api/grants/review/route.tsx +++ b/packages/nextjs/app/api/grants/review/route.tsx @@ -1,6 +1,8 @@ import { NextResponse } from "next/server"; import { getAllGrantsForReview } from "~~/services/database/grants"; +export const dynamic = "force-dynamic"; + export async function GET() { try { const grants = await getAllGrantsForReview(); diff --git a/packages/nextjs/app/layout.tsx b/packages/nextjs/app/layout.tsx index f5a6379..54e5a3b 100644 --- a/packages/nextjs/app/layout.tsx +++ b/packages/nextjs/app/layout.tsx @@ -6,9 +6,9 @@ import { ScaffoldEthAppWithProviders } from "~~/components/ScaffoldEthAppWithPro import { ThemeProvider } from "~~/components/ThemeProvider"; import "~~/styles/globals.css"; -const baseUrl = process.env.NEXT_PUBLIC_VERCEL_URL - ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` - : `http://localhost:${process.env.PORT}`; +const baseUrl = process.env.VERCEL_URL + ? `https://${process.env.VERCEL_URL}` + : `http://localhost:${process.env.PORT || 3000}`; const imageUrl = `${baseUrl}/thumbnail.jpg`; export const metadata: Metadata = { diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index 3fb9eef..35d9468 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -5,6 +5,8 @@ import { EcosystemGrants } from "./_components/EcosystemGrants"; import { GrantsStats } from "./_components/GrantsStats"; import { HomepageHero } from "./_components/HomepageHero"; +export const revalidate = 21600; // 6 hours + const Home = () => { return ( <> diff --git a/packages/nextjs/utils/scaffold-eth/getMetadata.ts b/packages/nextjs/utils/scaffold-eth/getMetadata.ts index 533784d..f146e07 100644 --- a/packages/nextjs/utils/scaffold-eth/getMetadata.ts +++ b/packages/nextjs/utils/scaffold-eth/getMetadata.ts @@ -9,10 +9,10 @@ export const getMetadata = ({ description: string; imageRelativePath?: string; }): Metadata => { - const baseUrl = process.env.NEXT_PUBLIC_VERCEL_URL - ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` - : `http://localhost:${process.env.PORT}`; - const imageUrl = `${baseUrl}${imageRelativePath}`; + const baseUrl = process.env.VERCEL_URL + ? `https://${process.env.VERCEL_URL}` + : `http://localhost:${process.env.PORT || 3000}`; + const imageUrl = `${baseUrl}/${imageRelativePath}`; return { title: title, description: description,