diff --git a/src/pages/lesson-list.tsx b/src/pages/lesson-list.tsx index d63f51c..2028372 100644 --- a/src/pages/lesson-list.tsx +++ b/src/pages/lesson-list.tsx @@ -65,6 +65,8 @@ interface LessonFormProps { onCancel: () => void onSubmit: (lesson: Lesson) => void error?: string + title: string + nameButton: string } const LessonForm = ({ @@ -73,6 +75,8 @@ const LessonForm = ({ onCancel, onSubmit, error, + title, + nameButton, }: LessonFormProps) => { const { control, @@ -90,7 +94,7 @@ const LessonForm = ({ - Создание лекции + {title} - Создать + {nameButton} @@ -343,6 +347,8 @@ const LessonList = () => { }} error={(crLQuery.error as any)?.error} lesson={editLesson} + title={editLesson ? 'Редактирование лекции' : 'Создание лекции'} + nameButton={editLesson ? 'Редактировать' : 'Создать'} /> ) : (