From 1907ec5680700cecf05b1c5a9eb373fd4b3dcff5 Mon Sep 17 00:00:00 2001 From: Tatyana Date: Thu, 21 Aug 2025 11:08:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=BF=D1=80=D0=BE=D0=BF=D1=81=D1=8B=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=B8=D0=BA=D0=BE=D0=BD=D0=BA=D0=B8=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B4=D0=B0=D1=80=D1=8F=20=D0=B8=20=D0=B3?= =?UTF-8?q?=D0=B0=D0=BD=D1=82=D0=B5=D0=BB=D0=B8=20=D0=B2=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B7=D0=BD=D1=8B=D1=85=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BottomNavigation.tsx | 8 +++--- .../cards/{StatCard.tsx => StatCardHome.tsx} | 23 +++++++++------ .../{WorkoutCard.tsx => WorkoutCardHome.tsx} | 2 +- src/components/icons/CalendarIcon.tsx | 6 ++-- src/components/icons/DumbbellIcon.tsx | 6 ++-- src/components/icons/ExerciseIcon.tsx | 28 ------------------- src/pages/CourseExercises.tsx | 4 +-- src/pages/Home.tsx | 17 ++++++----- 8 files changed, 37 insertions(+), 57 deletions(-) rename src/components/cards/{StatCard.tsx => StatCardHome.tsx} (69%) rename src/components/cards/{WorkoutCard.tsx => WorkoutCardHome.tsx} (96%) delete mode 100644 src/components/icons/ExerciseIcon.tsx diff --git a/src/components/BottomNavigation.tsx b/src/components/BottomNavigation.tsx index 6160994..16d5c49 100644 --- a/src/components/BottomNavigation.tsx +++ b/src/components/BottomNavigation.tsx @@ -9,8 +9,8 @@ import { getRouteCourseExercises } from "../shared/consts/router" import { getRouteSettings } from "../shared/consts/router" import { HomeIcon } from "./icons/HomeIcon" -import { CoursesIcon } from "./icons/CoursesIcon" -import { ExerciseIcon } from "./icons/ExerciseIcon" +import { CalendarIcon } from "./icons/CalendarIcon" +import { DumbbellIcon } from "./icons/DumbbellIcon" import { SettingsIcon } from "./icons/SettingsIcon" @@ -20,8 +20,8 @@ const BottomNavigation: React.FC = () => { const navItems = [ { path: getRouteHome(), icon: HomeIcon, label: "Домой" }, - { path: getRouteCourses(), icon: CoursesIcon, label: "Курсы" }, - { path: getRouteCourseExercises(":id"), icon: ExerciseIcon, label: "Тренировка" }, + { path: getRouteCourses(), icon: CalendarIcon, label: "Курсы" }, + { path: getRouteCourseExercises(":id"), icon: DumbbellIcon, label: "Тренировка" }, { path: getRouteSettings(), icon: SettingsIcon, label: "Меню" }, ] diff --git a/src/components/cards/StatCard.tsx b/src/components/cards/StatCardHome.tsx similarity index 69% rename from src/components/cards/StatCard.tsx rename to src/components/cards/StatCardHome.tsx index 29b995e..d00d3bf 100644 --- a/src/components/cards/StatCard.tsx +++ b/src/components/cards/StatCardHome.tsx @@ -5,18 +5,16 @@ import type React from "react" interface StatCardProps { title: string subtitle: string - icon: React.ComponentType<{ size?: number; className?: string; color?: string }> - iconColor: string - backgroundIconColor: string + icon: React.ComponentType<{ size?: number; fill?: string; className?: string; style?: React.CSSProperties }> + fill:string onClick: () => void } -export const StatCard: React.FC = ({ +export const StatCardHome: React.FC = ({ title, subtitle, icon: Icon, - iconColor, - backgroundIconColor, + fill, onClick, }) => { return ( @@ -25,11 +23,18 @@ export const StatCard: React.FC = ({ 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 cursor-pointer" > {/* Фоновая иконка */} - + {/* Основная иконка */}
- + +
{/* Текст */} @@ -37,4 +42,4 @@ export const StatCard: React.FC = ({
{subtitle}
) -} +} \ No newline at end of file diff --git a/src/components/cards/WorkoutCard.tsx b/src/components/cards/WorkoutCardHome.tsx similarity index 96% rename from src/components/cards/WorkoutCard.tsx rename to src/components/cards/WorkoutCardHome.tsx index 5e3be9d..7dace26 100644 --- a/src/components/cards/WorkoutCard.tsx +++ b/src/components/cards/WorkoutCardHome.tsx @@ -7,7 +7,7 @@ interface WorkoutCardProps { onCardClick: () => void } -export const WorkoutCard: React.FC = ({ onBackClick, onCardClick }) => { +export const WorkoutCardHome: React.FC = ({ onBackClick, onCardClick }) => { return (
= ({ size = 40, className = "", color = "#2B8794" }) => ( +export const CalendarIcon: React.FC = ({ active = false, size = 40, className = "", fill = active ? "#2B8794" : "#ffffff" }) => ( = ({ size = 40, className = "", color = "#FF8D28" }) => ( +export const DumbbellIcon: React.FC = ({ active = false, size = 40, className = "", fill = active ? "#2B8794" : "#ffffff" }) => ( = ({ active = false, size = 40, className = "" }) => ( - - - - - - - - - - - -) diff --git a/src/pages/CourseExercises.tsx b/src/pages/CourseExercises.tsx index cbd19f5..2491ea4 100644 --- a/src/pages/CourseExercises.tsx +++ b/src/pages/CourseExercises.tsx @@ -2,7 +2,7 @@ import type React from "react" import { useState } from "react" -import { useHistory, useParams } from "react-router-dom" +import { useHistory } from "react-router-dom" import HeaderNav from "../components/HeaderNav" import BottomNavigation from "../components/BottomNavigation" @@ -13,7 +13,7 @@ import { getRouteExercise } from "../shared/consts/router" const CourseExercises: React.FC = () => { const history = useHistory() - const { id } = useParams<{ id: string }>(); + // const { id } = useParams<{ id: string }>(); const [currentSlide, setCurrentSlide] = useState(0) diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 5714aa7..2719cbd 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -12,8 +12,9 @@ import HeaderNav from "../components/HeaderNav" import BottomNavigation from "../components/BottomNavigation" import CircularProgressDisplay from "../components/CircularProgressDisplay" -import { WorkoutCard } from "../components/cards/WorkoutCard" -import { StatCard } from "../components/cards/StatCard" + +import { StatCardHome } from "../components/cards/StatCardHome" +import { WorkoutCardHome } from "../components/cards/WorkoutCardHome" import { getRouteExercise } from "../shared/consts/router" import { getRouteCourses } from "../shared/consts/router" @@ -118,24 +119,22 @@ export default function Home() {
{/* Current Exercise */} - + {/* Quick Stats (Total Exercises & Total Courses) */}
- -