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:
33
src/app/universite/[slug]/opengraph-image.tsx
Normal file
33
src/app/universite/[slug]/opengraph-image.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { getAllUniversiteler } from "@/lib/katalog";
|
||||
import { trBaslikDuzeni } from "@/lib/slug";
|
||||
import {
|
||||
createOgSayfaImage,
|
||||
OG_CONTENT_TYPE,
|
||||
OG_SIZE,
|
||||
} from "@/lib/og-sayfa";
|
||||
|
||||
export const alt = "Üniversite 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 uni = getAllUniversiteler().find((u) => u.slug === slug);
|
||||
const ad = uni?.ad ?? "Üniversite";
|
||||
const parcalar: string[] = [];
|
||||
if (uni?.il) parcalar.push(trBaslikDuzeni(uni.il));
|
||||
if (uni?.programSayisi != null) {
|
||||
parcalar.push(`${uni.programSayisi.toLocaleString("tr-TR")} program`);
|
||||
}
|
||||
parcalar.push("2025 yerleştirme verileri");
|
||||
|
||||
return createOgSayfaImage({
|
||||
eyebrow: "Üniversite",
|
||||
title: `${ad} taban puanları`,
|
||||
description: parcalar.join(" · "),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user