refactor: optimize data fetching by using Promise.all

This commit is contained in:
ArraysID
2025-05-11 05:24:31 +07:00
parent ef042f2f40
commit 54b7a2f0eb
+4 -2
View File
@@ -12,8 +12,10 @@ import { Testimonials } from './_components/testimonials';
export const revalidate = 60 * 5; // Seconds
export default async function Page() {
const heroData = await getGlobalsHeroSection();
const featuresData = await getGlobalsFeaturesSection();
const [heroData, featuresData] = await Promise.all([
getGlobalsHeroSection(),
getGlobalsFeaturesSection(),
]);
return (
<div className="flex min-h-screen flex-col">