"use client" import type React from "react" import { useHistory, useLocation } from "react-router-dom" import { getRouteHome } from "../shared/consts/router" import { getRouteCourses } from "../shared/consts/router" 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 { SettingsIcon } from "./icons/SettingsIcon" const BottomNavigation: React.FC = () => { const history = useHistory() const location = useLocation() const navItems = [ { path: getRouteHome(), icon: HomeIcon, label: "Домой" }, { path: getRouteCourses(), icon: CoursesIcon, label: "Курсы" }, { path: getRouteCourseExercises(":id"), icon: ExerciseIcon, label: "Тренировка" }, { path: getRouteSettings(), icon: SettingsIcon, label: "Меню" }, ] const isActive = (path: string) => { // Проверка на совпадение или включение return location.pathname === path || location.pathname.startsWith(path) } return (
) } export default BottomNavigation