Skip to content

Commit acbb02f

Browse files
authored
chore: add ISR revalidation to templates pages (#925)
* Add ISR revalidation to templates pages * Update featured template to x402-template
1 parent 0db1f3a commit acbb02f

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

apps/templates/src/app/[locale]/[id]/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { TemplatesProviderWrapper } from "@/components/providers/templates-provi
55
import { BackgroundShapes } from "@/components/background-shapes";
66
import type { Metadata } from "next";
77

8+
export const revalidate = 3600;
9+
810
export async function generateStaticParams() {
911
const templates = await fetchTemplatesFromGitHub();
1012
return templates.map((template) => ({

apps/templates/src/app/[locale]/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { fetchTemplatesFromGitHub } from "@/lib/fetch-templates";
66
import { AppProviders } from "@/components/app-providers";
77
import { TemplatesProviderWrapper } from "@/components/providers/templates-provider-wrapper";
88

9+
export const revalidate = 3600;
10+
911
export default async function TemplatesPage() {
1012
const templates = await fetchTemplatesFromGitHub();
1113
const t = await getTranslations("templates");

apps/templates/src/lib/templates/filter-templates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const DEFAULT_TEMPLATE_NAMES = [
77
"gill-react-vite-tailwind-basic", // Fullstack boilerplate (Vite)
88
"web3js-expo", // Mobile
99
"gill-jito-airdrop", // Airdrop
10-
"x402-solana-protocol", // Payments
10+
"x402-template", // X402 Next.js
1111
"gill-node-express", // Backend
1212
];
1313

0 commit comments

Comments
 (0)