Enhance application performance and user experience by enabling component caching in next.config.ts, optimizing database queries in various pages, and implementing lazy loading for heavy components. Updated styles for smoother transitions and improved visual clarity in multiple components, including globals.css and landing sections.
All checks were successful
Deploy / deploy (push) Successful in 2m30s

This commit is contained in:
bilalgursen
2026-08-01 14:00:22 +03:00
parent acb3b9d557
commit 569b9e5da2
29 changed files with 458 additions and 126 deletions

View File

@@ -0,0 +1,21 @@
import { Skeleton } from "@/components/ui/skeleton";
// /rapor/yazdir rapor sorgusunu bekler — belge düzeninde iskelet.
export default function Loading() {
return (
<main
aria-live="polite"
className="mx-auto w-full max-w-3xl bg-white p-8"
>
<div className="border-b-2 border-slate-200 pb-4">
<Skeleton className="h-8 w-64" />
<Skeleton className="mt-2 h-4 w-40" />
</div>
<div className="mt-6 space-y-3">
{Array.from({ length: 8 }).map((_, i) => (
<Skeleton key={i} className="h-14 w-full rounded-lg" />
))}
</div>
</main>
);
}

View File

@@ -20,14 +20,16 @@ const DILIM_LABEL: Record<string, string> = {
};
export default async function YazdirPage() {
await verifySession("/rapor/yazdir");
const user = await getCurrentUser();
const session = await verifySession("/rapor/yazdir");
// Kullanıcı satırı ile rapor sorgusu bağımsız — paralel çöz
const [user, satir] = await Promise.all([
getCurrentUser(),
appDb.query.reports.findFirst({
where: eq(schema.reports.userId, session.user.id),
}),
]);
if (!user) redirect("/giris");
if (!user.hasPaket) redirect("/paket");
const satir = await appDb.query.reports.findFirst({
where: eq(schema.reports.userId, user.id),
});
if (!satir?.result) redirect("/sonuc");
const rapor = satir.result as RaporSonuc;