diff --git a/web/src/app/community/page.tsx b/web/src/app/community/page.tsx index 01ee75bc..1cf36ff6 100644 --- a/web/src/app/community/page.tsx +++ b/web/src/app/community/page.tsx @@ -2,7 +2,9 @@ import type { Metadata } from "next" import { Suspense } from "react" import { CommunityIconSearch } from "@/components/community-icon-search" import { BASE_URL } from "@/constants" -import { getCommunitySubmissions } from "@/lib/community" +import { fetchCommunitySubmissions, getCommunitySubmissions } from "@/lib/community" + +export const revalidate = 300 export async function generateMetadata(): Promise { const icons = await getCommunitySubmissions() @@ -39,7 +41,7 @@ export async function generateMetadata(): Promise { } export default async function CommunityPage() { - const icons = await getCommunitySubmissions() + const icons = await fetchCommunitySubmissions(); return (
diff --git a/web/src/lib/community.ts b/web/src/lib/community.ts index eb732162..47c7df60 100644 --- a/web/src/lib/community.ts +++ b/web/src/lib/community.ts @@ -118,7 +118,7 @@ function transformGalleryToIcon(item: CommunityGallery): any { * Uses the community_gallery view collection for public-facing data * This is the raw fetch function without caching */ -async function fetchCommunitySubmissions(): Promise { +export async function fetchCommunitySubmissions(): Promise { try { const pb = createServerPB()