init
This commit is contained in:
@@ -8,14 +8,17 @@ import { formatDateShort, formatDistance, formatDuration, formatPace } from "@/l
|
||||
import { getDashboardAnalysis, serializeAnalysis } from "@/lib/models/analysis";
|
||||
import { listRunningActivities } from "@/lib/models/running";
|
||||
import { listStrengthWorkouts } from "@/lib/models/strength";
|
||||
import { getCurrentUserId } from "@/lib/session";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function Home() {
|
||||
const userId = await getCurrentUserId();
|
||||
|
||||
const [runs, strengthWorkouts, dashboardAnalysis] = await Promise.all([
|
||||
listRunningActivities(),
|
||||
listStrengthWorkouts(),
|
||||
getDashboardAnalysis(),
|
||||
listRunningActivities(userId),
|
||||
listStrengthWorkouts(userId),
|
||||
getDashboardAnalysis(userId),
|
||||
]);
|
||||
|
||||
const weekStart = startOfWeek(new Date(), { weekStartsOn: 1 });
|
||||
|
||||
Reference in New Issue
Block a user