Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/nextjs/app/api/grants/review/route.tsx
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
6 changes: 3 additions & 3 deletions packages/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 2 additions & 0 deletions packages/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand Down
8 changes: 4 additions & 4 deletions packages/nextjs/utils/scaffold-eth/getMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down