refactor: optimize data fetching by using Promise.all
This commit is contained in:
1 parent
ef042f2f40
commit
54b7a2f0eb
1 file changed
+4
-2
@@ -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">
|
||||
|
||||
Reference in new issue
Block a user