import Link from "next/link"; import { Badge } from "@/components/ui/Badge"; import type { SupersetExercise } from "@/lib/types"; function mediaUrl(path: string): string { if (typeof window === "undefined") return path; if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") { return `${window.location.protocol}//${window.location.hostname}:8001${path}`; } return path; } interface ExerciseRowProps { exercise: SupersetExercise; } export function ExerciseRow({ exercise }: ExerciseRowProps) { const ex = exercise.exercise; const details: string[] = []; if (exercise.reps) { details.push(`${exercise.reps} reps`); } if (exercise.duration) { details.push(`${exercise.duration}s`); } if (exercise.weight) { details.push(`${exercise.weight} lbs`); } const muscles = ex.muscles?.map((m) => m.name) || []; return (
{details.join(" / ")}
)} {muscles.length > 0 && (