diff --git a/web/src/app/icons/[icon]/opengraph-image.tsx b/web/src/app/icons/[icon]/opengraph-image.tsx
index 67157dec..330b09e3 100644
--- a/web/src/app/icons/[icon]/opengraph-image.tsx
+++ b/web/src/app/icons/[icon]/opengraph-image.tsx
@@ -24,8 +24,31 @@ export const size = {
width: 1200,
height: 630,
}
-export default async function Image({ params }: { params: { icon: string } }) {
- const { icon } = params
+export default async function Image({ params }: { params: Promise<{ icon: string }> }) {
+ const { icon } = await params
+
+ if (!icon) {
+ console.error(`[Opengraph Image] Icon not found for ${icon}`)
+ return new ImageResponse(
+
+ Icon not found
+
,
+ { ...size },
+ )
+ }
+
const iconsData = await getAllIcons()
const totalIcons = Object.keys(iconsData).length
const index = Object.keys(iconsData).indexOf(icon)
diff --git a/web/src/app/icons/[icon]/page.tsx b/web/src/app/icons/[icon]/page.tsx
index 6f5884fc..f436e112 100644
--- a/web/src/app/icons/[icon]/page.tsx
+++ b/web/src/app/icons/[icon]/page.tsx
@@ -3,6 +3,7 @@ import { notFound } from "next/navigation"
import { IconDetails } from "@/components/icon-details"
import { BASE_URL, WEB_URL } from "@/constants"
import { getAllIcons, getAuthorData } from "@/lib/api"
+import { AuthorData } from "@/types"
export const dynamicParams = false
export async function generateStaticParams() {
diff --git a/web/src/app/page.tsx b/web/src/app/page.tsx
index 93afb8fa..3b57bf5f 100644
--- a/web/src/app/page.tsx
+++ b/web/src/app/page.tsx
@@ -4,7 +4,9 @@ import { REPO_NAME } from "@/constants"
import { getRecentlyAddedIcons, getTotalIcons } from "@/lib/api"
async function getGitHubStars() {
- const response = await fetch(`https://api.github.com/repos/${REPO_NAME}`)
+ const response = await fetch(`https://api.github.com/repos/${REPO_NAME}`, {
+ next: { revalidate: 3600 },
+ })
const data = await response.json()
console.log(`GitHub stars: ${data.stargazers_count}`)
return data.stargazers_count
diff --git a/web/src/app/submit/page.tsx b/web/src/app/submit/page.tsx
index 4a6f231d..7f564d77 100644
--- a/web/src/app/submit/page.tsx
+++ b/web/src/app/submit/page.tsx
@@ -44,9 +44,7 @@ export default function SubmitPage() {
Submit an Icon
-
- Share your icons with the community and help expand our collection
-
+ Share your icons with the community and help expand our collection
@@ -87,4 +85,3 @@ export default function SubmitPage() {
)
}
-