perf: apply Vercel React best practices (async-parallel and server-serialization)

This commit is contained in:
AyrisAI
2026-05-16 01:17:45 +03:00
parent 15fee9be38
commit 782e11f795
2 changed files with 12 additions and 8 deletions

View File

@@ -19,8 +19,9 @@ export async function generateMetadata(): Promise<Metadata> {
export default async function ServicesPage() {
const [services, locations] = await Promise.all([
sql`SELECT * FROM services ORDER BY display_order ASC`,
sql`SELECT * FROM locations ORDER BY display_order ASC`
// Vercel Best Practice: server-serialization - Select only required fields
sql`SELECT id, title, description, slug, icon_name, sub_services FROM services ORDER BY display_order ASC`,
sql`SELECT id, name, slug FROM locations ORDER BY display_order ASC`
]);
const servicesSchema = {