import { sql } from '@/lib/db' import ArticleCard from '@/components/ArticleCard' export const dynamic = 'force-dynamic' import TrendingSection from '@/components/TrendingSection' import CategoryNav from '@/components/CategoryNav' async function getRecentArticles() { try { const { rows } = await sql` SELECT * FROM published_articles ORDER BY published_at DESC LIMIT 20 ` return rows } catch (error) { console.error('Error fetching articles:', error) return [] } } async function getTrendingArticles() { try { const { rows } = await sql`SELECT * FROM get_trending_articles(10)` return rows } catch (error) { console.error('Error fetching trending:', error) return [] } } export default async function Home() { const [articles, trending] = await Promise.all([ getRecentArticles(), getTrendingArticles() ]) return (
{/* Hero Section */}

Burmddit

AI သတင်းများ၊ သင်ခန်းစာများနှင့် အကြံပြုချက်များ

Daily AI News, Tutorials & Tips in Burmese

{/* Category Navigation */} {/* Main Content Grid */}
{/* Main Articles (Left 2/3) */}

နောက်ဆုံးရ သတင်းများ

{articles.length === 0 ? (

သတင်းမရှိသေးပါ။ မကြာမီ ထပ်စစ်ကြည့်ပါ။

) : (
{articles.map((article) => ( ))}
)}
{/* Sidebar (Right 1/3) */}
) }