Refactor font loading functions to implement caching for improved performance. The loadSiteOgFonts and loadRehberOgFonts functions now utilize promises to prevent redundant loading, enhancing efficiency. Additionally, minor adjustments were made to ensure consistent font data structure and style definitions.
All checks were successful
Deploy / deploy (push) Successful in 7m1s
All checks were successful
Deploy / deploy (push) Successful in 7m1s
This commit is contained in:
31
src/app/bolum/[slug]/opengraph-image.tsx
Normal file
31
src/app/bolum/[slug]/opengraph-image.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import { getAllBolumler } from "@/lib/katalog";
|
||||
import {
|
||||
createOgSayfaImage,
|
||||
OG_CONTENT_TYPE,
|
||||
OG_SIZE,
|
||||
} from "@/lib/og-sayfa";
|
||||
|
||||
export const alt = "Bölüm taban puanları ve sıralamaları — KolayTercih";
|
||||
export const size = OG_SIZE;
|
||||
export const contentType = OG_CONTENT_TYPE;
|
||||
|
||||
export default async function Image({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ slug: string }>;
|
||||
}) {
|
||||
const { slug } = await params;
|
||||
const bolum = getAllBolumler().find((b) => b.slug === slug);
|
||||
const ad = bolum?.ad ?? "Bölüm";
|
||||
const programSayisi = bolum?.programSayisi;
|
||||
const sayi =
|
||||
programSayisi != null
|
||||
? `${programSayisi.toLocaleString("tr-TR")} program · `
|
||||
: "";
|
||||
|
||||
return createOgSayfaImage({
|
||||
eyebrow: "Bölüm",
|
||||
title: `${ad} taban puanları`,
|
||||
description: `${sayi}2025 yerleştirme verileri · 2026 tercih rehberi`,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user