refactor: optimize data fetching by using Promise.all

This commit is contained in:
ArraysID
2025-05-10 04:29:46 +07:00
parent 7fd5528c0d
commit d4a91abb63
+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">