{article.title_burmese}
{/* Excerpt */}{article.excerpt_burmese}
{/* Tags */} {article.tags_burmese && article.tags_burmese.length > 0 && (import { sql } from '@/lib/db' export const dynamic = "force-dynamic" import Image from 'next/image' import Link from 'next/link' async function getArticlesWithTags() { try { const { rows } = await sql` SELECT * FROM articles_with_tags ORDER BY published_at DESC LIMIT 20 ` return rows } catch (error) { console.error('Error fetching articles:', error) return [] } } async function getFeaturedArticle() { try { const { rows } = await sql` SELECT * FROM articles_with_tags ORDER BY view_count DESC LIMIT 1 ` return rows[0] || null } catch (error) { return null } } async function getTrendingTags() { try { const { rows } = await sql` SELECT t.name_burmese, t.slug, COUNT(at.article_id) as count FROM tags t JOIN article_tags at ON t.id = at.tag_id JOIN articles a ON at.article_id = a.id WHERE a.status = 'published' GROUP BY t.id ORDER BY count DESC LIMIT 15 ` return rows } catch (error) { return [] } } export default async function ImprovedHome() { const [articles, featured, trendingTags] = await Promise.all([ getArticlesWithTags(), getFeaturedArticle(), getTrendingTags() ]) return (
{featured.excerpt_burmese}
{/* Tags */} {featured.tags_burmese && featured.tags_burmese.length > 0 && (သတင်းမရှိသေးပါ။ မကြာမီ ပြန်စစ်ကြည့်ပါ။
{article.excerpt_burmese}
{/* Tags */} {article.tags_burmese && article.tags_burmese.length > 0 && (