Skip to content

Commit 6b6d6c0

Browse files
improve performance
1 parent bc288a0 commit 6b6d6c0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Diff for: src/app/admin/dashboard/page.tsx

+8-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ import { getCategoryData } from '@/actions/categories'
44
import { getLatestUsers } from '@/actions/auth'
55

66
const Dashboard = async () => {
7-
const monthlyOrders = await getMonthlyOrders()
8-
const categoryData = await getCategoryData()
9-
const latestUsers = await getLatestUsers()
7+
// const monthlyOrders = await getMonthlyOrders()
8+
// const categoryData = await getCategoryData()
9+
// const latestUsers = await getLatestUsers()
10+
const [monthlyOrders, categoryData, latestUsers] = await Promise.all([
11+
getMonthlyOrders(),
12+
getCategoryData(),
13+
getLatestUsers(),
14+
])
1015

1116
return (
1217
<PageComponent

0 commit comments

Comments
 (0)