diff --git a/src/pages/CourseExercises.tsx b/src/pages/CourseExercises.tsx index d9718c3..177b3a1 100644 --- a/src/pages/CourseExercises.tsx +++ b/src/pages/CourseExercises.tsx @@ -9,6 +9,7 @@ import BottomNavigation from "../components/BottomNavigation"; import { connect } from '../confconnect'; import { getRouteExercise } from "../shared/consts/router"; +import { ArrowIcon } from "../components/icons/ArrowIcon"; interface CourseExercises { @@ -18,11 +19,13 @@ interface CourseExercises { day: number; position: number; repeats: number; + time: string; } interface Exercise { id: number; title: string; + } @@ -102,8 +105,8 @@ export const CourseExercises = () => { {/* Заголовок секции */}
-

Список упражнений

- {course_exercises.length} Упражнения +

Упражнения

+ Количество упражнений: {course_exercises.length}
{/* Кнопки выбора дня */} @@ -146,25 +149,21 @@ export const CourseExercises = () => { className="p-4 mb-4 cursor-pointer hover:scale-105 transition duration-300 glass-morphism rounded-3xl border border-white/50 shadow-2xl overflow-hidden backdrop-blur-2xl relative">
-

Упражнение {item.id_exercise}

+

Упражнение {item.position}

{item.exercise.title}

- {/* Иконка стрелки */} -
- - - -
+ + + +
-
+
-
-

День: {item.day}

- · -

Позиция: {item.position}

- · +

Повторений: {item.repeats}

+ +

Время выполнения: {item.time}

)) diff --git a/src/pages/Courses.tsx b/src/pages/Courses.tsx index 74814b1..7100851 100644 --- a/src/pages/Courses.tsx +++ b/src/pages/Courses.tsx @@ -9,7 +9,7 @@ import HeaderNav from "../components/HeaderNav"; import { connect } from '../confconnect'; import { getRouteCourseExercises } from '../shared/consts/router'; -interface Course { +export interface Course { ID: number; title: string; desc: string; diff --git a/src/pages/Exercise.tsx b/src/pages/Exercise.tsx index 2b9a1d4..9c5a6ab 100644 --- a/src/pages/Exercise.tsx +++ b/src/pages/Exercise.tsx @@ -119,7 +119,7 @@ export const Exercise = () => { if (prev >= totalTime) { setIsPlaying(false) // Отправляем результат на сервер при завершении - submitProgress() + // submitProgress() // Show completion animation // history.push(getRouteCourseComplete()) return totalTime @@ -143,21 +143,21 @@ export const Exercise = () => { // Функция для отправки прогресса на сервер - const submitProgress = async () => { - if (!courseId || !exerciseId) return + // const submitProgress = async () => { + // if (!courseId || !exerciseId) return - try { - const timeUsers = formatTime(currentTime) // Отправляем время в формате MM:SS + // try { + // const timeUsers = formatTime(currentTime) // Отправляем время в формате MM:SS - await connect.post(`pacient/${courseId}/${exerciseId}`, { - time_users: timeUsers, - }) + // await connect.post(`pacient/${courseId}/${exerciseId}`, { + // time_users: timeUsers, + // }) - console.log("Прогресс отправлен на сервер:", timeUsers) - } catch (error) { - console.error("Ошибка при отправке прогресса:", error) - } - } + // console.log("Прогресс отправлен на сервер:", timeUsers) + // } catch (error) { + // console.error("Ошибка при отправке прогресса:", error) + // } + // } const formatTime = (seconds: number) => { const mins = Math.floor(seconds / 60) @@ -263,7 +263,8 @@ export const Exercise = () => { return (
- +
@@ -388,7 +389,7 @@ export const Exercise = () => { onTouchStart={() => setIsActive(true)} onTouchEnd={() => setIsActive(false)} - className={`cursor-pointer px-6 py-3 font-bold rounded-xl transition-all duration-500 hover:scale-105 hover:shadow-lg border border-gray-200 flex items-center justify-center ${!isActive ? "bg-white text-cyan-500" : "bg-orange-400 text-white"}`} + className={`cursor-pointer px-6 py-3 font-bold rounded-xl transition-all duration-700 hover:scale-105 hover:shadow-lg border border-gray-200 flex items-center justify-center ${!isActive ? "bg-white text-cyan-500" : "bg-orange-400 text-white"}`} >