init
This commit is contained in:
@@ -5,7 +5,7 @@ import { DashboardAnalysisCard } from "@/components/dashboard-analysis-card";
|
||||
import { EmptyState } from "@/components/empty-state";
|
||||
import { StatCard } from "@/components/stat-card";
|
||||
import { formatDateShort, formatDistance, formatDuration, formatPace } from "@/lib/format";
|
||||
import { getDashboardAnalysis } from "@/lib/models/analysis";
|
||||
import { getDashboardAnalysis, serializeAnalysis } from "@/lib/models/analysis";
|
||||
import { listRunningActivities } from "@/lib/models/running";
|
||||
import { listStrengthWorkouts } from "@/lib/models/strength";
|
||||
|
||||
@@ -84,7 +84,7 @@ export default async function Home() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<DashboardAnalysisCard analysis={dashboardAnalysis} />
|
||||
<DashboardAnalysisCard analysis={dashboardAnalysis ? serializeAnalysis(dashboardAnalysis) : null} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { RouteMapSection } from "@/components/route-map-section";
|
||||
import { StatCard } from "@/components/stat-card";
|
||||
import { formatDate, formatDistance, formatDuration, formatPace } from "@/lib/format";
|
||||
import { fetchActivityRoutePoints, getAuthorizedClient } from "@/lib/garmin/client";
|
||||
import { getLatestAnalysisForTarget } from "@/lib/models/analysis";
|
||||
import { getLatestAnalysisForTarget, serializeAnalysis } from "@/lib/models/analysis";
|
||||
import { getRunningActivity, setRunningActivityRoutePoints, type RunningActivity } from "@/lib/models/running";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
@@ -117,7 +117,7 @@ export default async function RunningActivityPage({
|
||||
) : null}
|
||||
</section>
|
||||
|
||||
<AiAnalysisCard targetType="running" targetId={activity._id.toString()} analysis={analysis} />
|
||||
<AiAnalysisCard targetType="running" targetId={activity._id.toString()} analysis={analysis ? serializeAnalysis(analysis) : null} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { AiAnalysisCard } from "@/components/ai-analysis-card";
|
||||
import { ExerciseProgressChart } from "@/components/exercise-progress-chart";
|
||||
import { InfoTooltip } from "@/components/info-tooltip";
|
||||
import { formatDate, formatDateShort } from "@/lib/format";
|
||||
import { getLatestAnalysisForTarget } from "@/lib/models/analysis";
|
||||
import { getLatestAnalysisForTarget, serializeAnalysis } from "@/lib/models/analysis";
|
||||
import { getStrengthWorkout, listStrengthWorkouts } from "@/lib/models/strength";
|
||||
import { exerciseE1rm, getExerciseHistory } from "@/lib/strength/stats";
|
||||
|
||||
@@ -40,7 +40,7 @@ export default async function StrengthWorkoutPage({
|
||||
{workout.notes ? <p className="mt-1.5 text-sm text-fg/70">{workout.notes}</p> : null}
|
||||
</div>
|
||||
|
||||
<AiAnalysisCard targetType="strength" targetId={workout._id.toString()} analysis={analysis} />
|
||||
<AiAnalysisCard targetType="strength" targetId={workout._id.toString()} analysis={analysis ? serializeAnalysis(analysis) : null} />
|
||||
|
||||
<div className="grid grid-cols-2 gap-2.5 sm:grid-cols-3">
|
||||
{exercisesWithHistory.map(({ exercise }, index) => {
|
||||
|
||||
Reference in New Issue
Block a user