diff --git a/src/pages/lesson-details/LessonDetails.tsx b/src/pages/lesson-details/LessonDetails.tsx index 76fd65e45..d443c5ae1 100644 --- a/src/pages/lesson-details/LessonDetails.tsx +++ b/src/pages/lesson-details/LessonDetails.tsx @@ -1,8 +1,10 @@ import { useCallback, useState } from 'react' import { useParams, useNavigate } from 'react-router-dom' +import { useTranslation } from 'react-i18next' import { AxiosResponse } from 'axios' import Box from '@mui/material/Box' import ExpandMoreIcon from '@mui/icons-material/ExpandMore' +import EditIcon from '@mui/icons-material/Edit' import Loader from '~/components/loader/Loader' import TitleWithDescription from '~/components/title-with-description/TitleWithDescription' @@ -15,16 +17,20 @@ import { } from '~/pages/lesson-details/LessonDetails.constants' import Accordions from '~/components/accordion/Accordions' import IconExtensionWithTitle from '~/components/icon-extension-with-title/IconExtensionWithTitle' +import AppButton from '~/components/app-button/AppButton' import { errorRoutes } from '~/router/constants/errorRoutes' +import { authRoutes } from '~/router/constants/authRoutes' import { styles } from '~/pages/lesson-details/LessonsDetails.styles' import { Lesson, TypographyVariantEnum } from '~/types' +import { createUrlPath } from '~/utils/helper-functions' const LessonDetails = () => { const [activeItems, setActiveItems] = useState([]) const { id } = useParams() const navigate = useNavigate() + const { t } = useTranslation() const onChange = (activeItem: number) => { setActiveItems((prevActiveItems) => { @@ -57,6 +63,10 @@ const LessonDetails = () => { return } + const handleEditLesson = () => { + navigate(createUrlPath(authRoutes.myResources.editLesson.path, id)) + } + const attachmentsList = attachmentsMock.map((attachment) => ( { return ( + + {t('common.edit')} +