|
|
@@ -1,4 +1,5 @@
|
|
|
import { cache } from "react";
|
|
|
+import { getOverviewData } from "@/actions/overview";
|
|
|
import { getUserStatistics } from "@/actions/statistics";
|
|
|
import { getSystemSettings } from "@/repository/system-config";
|
|
|
import { DEFAULT_TIME_RANGE } from "@/types/statistics";
|
|
|
@@ -11,9 +12,10 @@ interface DashboardBentoSectionProps {
|
|
|
}
|
|
|
|
|
|
export async function DashboardBentoSection({ isAdmin }: DashboardBentoSectionProps) {
|
|
|
- const [systemSettings, statistics] = await Promise.all([
|
|
|
+ const [systemSettings, statistics, overviewResult] = await Promise.all([
|
|
|
getCachedSystemSettings(),
|
|
|
getUserStatistics(DEFAULT_TIME_RANGE),
|
|
|
+ getOverviewData(),
|
|
|
]);
|
|
|
|
|
|
return (
|
|
|
@@ -22,6 +24,7 @@ export async function DashboardBentoSection({ isAdmin }: DashboardBentoSectionPr
|
|
|
currencyCode={systemSettings.currencyDisplay}
|
|
|
allowGlobalUsageView={systemSettings.allowGlobalUsageView}
|
|
|
initialStatistics={statistics.ok ? statistics.data : undefined}
|
|
|
+ initialOverview={overviewResult.ok ? overviewResult.data : undefined}
|
|
|
/>
|
|
|
);
|
|
|
}
|