"use client" import { useEffect, useState } from "react" import { useHistory } from "react-router-dom" import HeaderNav from "../components/HeaderNav" import BottomNavigation from "../components/BottomNavigation" import CircularProgressDisplay from "../components/CircularProgressDisplay" export default function Home() { const history = useHistory() const [currentDate, setCurrentDate] = useState("") useEffect(() => { setCurrentDate( new Date().toLocaleDateString("ru-RU", { year: "numeric", month: "long", day: "numeric", }), ) }, []) const courses = [ { id: 1, name: "Восстановление колена", progress: 75, color: "from-[#2BACBE] to-cyan-600", icon: "🦵", exercises: 12, nextExercise: "Подъемы ног лежа", }, { id: 2, name: "Укрепление спины", progress: 45, color: "from-emerald-500 to-green-600", icon: "🏃‍♂️", exercises: 8, nextExercise: "Планка", }, { id: 3, name: "Реабилитация плеча", progress: 90, color: "from-purple-500 to-pink-600", icon: "💪", exercises: 10, nextExercise: "Вращения плечами", }, ] // Calculate overall progress, total courses, total exercises const totalCourses = courses.length const totalExercises = courses.reduce((sum, course) => sum + course.exercises, 0) const overallProgress = Math.round(courses.reduce((sum, course) => sum + course.progress, 0) / totalCourses) return (

Добрый день!

{currentDate}

Все курсы
{totalCourses}/1
Все упражнения
{totalExercises}/4
history.push("/exercise/1")} className="px-4 sm:px-6 space-y-6 "> {/* Current Exercise */}
{/* Заголовок и статус */}

Тренировка

{/* Основной блок с иконками и прогрессом */}
{/* Иконка часов */}
{/* Clock SVG */}
{/* Пульсирующая точка */}
{/* Информация о упражнении */}

В процессе

Текущее упражнение

{/* Кнопка с стрелкой */}
{/* Quick Stats (Total Exercises & Total Courses) */}
history.push("/courses")} className="glass-morphism rounded-3xl text-left border border-white/50 shadow-lg backdrop-blur-xl p-6 text-white transition-transform transform hover:scale-105 duration-300 overflow-hidden">
{/* Clock icon SVG */}
Курсы
все назначенные
history.push("/course/${courseId}/exercises")} className="glass-morphism rounded-3xl text-left border border-white/50 shadow-lg backdrop-blur-xl p-6 text-white transition-transform transform hover:scale-105 duration-300 overflow-hidden">
Упражнения
внутри текущего курса
) }