Skip to content

Commit 6ca6077

Browse files
committed
Perf: Add global loading state and enable ISR for list pages
1 parent 3ba6533 commit 6ca6077

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

web/src/app/(main)/bodhakatha/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import Link from 'next/link';
22
import prisma from '@/lib/db';
33
import { Lightbulb } from 'lucide-react';
44

5+
export const revalidate = 3600; // Revalidate every hour
6+
7+
58
export default async function BodhakathaPage() {
69
const bodhakathaArticles = await prisma.bodhakatha.findMany({
710
orderBy: { orderId: 'asc' }

web/src/app/(main)/leela/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import Link from 'next/link';
22
import prisma from '@/lib/db';
33
import { Footprints } from 'lucide-react';
44

5+
export const revalidate = 3600; // Revalidate every hour
6+
7+
58
export default async function LeelaPage() {
69
const leelaArticles = await prisma.leela.findMany({
710
orderBy: { orderId: 'asc' }

web/src/app/loading.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
export default function Loading() {
2+
return (
3+
<div className="flex flex-col items-center justify-center min-h-[60vh] space-y-6">
4+
{/* Pulsing Logo */}
5+
<div className="relative w-20 h-20 animate-pulse">
6+
<div className="absolute inset-0 bg-ochre/20 rounded-full blur-xl animate-pulse" />
7+
<div className="relative bg-white p-4 rounded-full shadow-xl border border-ochre/10">
8+
<div className="w-12 h-12 border-t-4 border-r-4 border-ochre rounded-full animate-spin" />
9+
</div>
10+
</div>
11+
12+
{/* Loading text */}
13+
<div className="text-center space-y-2">
14+
<h3 className="text-lg font-bold text-gray-800 tracking-wider uppercase animate-pulse">
15+
Loading Saileela...
16+
</h3>
17+
<p className="text-xs text-ochre font-serif italic">
18+
"Shraddha & Saburi"
19+
</p>
20+
</div>
21+
</div>
22+
);
23+
}

0 commit comments

Comments
 (0)