perf: apply Vercel React best practices (async-parallel and server-serialization)
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user