Compare commits
2 Commits
4504961fa0
...
4d498662f8
Author | SHA1 | Date | |
---|---|---|---|
4d498662f8 | |||
1320a50af0 |
@ -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 = ({
|
||||
<Card align="left">
|
||||
<CardHeader display="flex">
|
||||
<Heading as="h2" mt="0">
|
||||
Создание лекции
|
||||
{title}
|
||||
</Heading>
|
||||
<CloseButton
|
||||
ml="auto"
|
||||
@ -153,7 +157,7 @@ const LessonForm = ({
|
||||
colorScheme="blue"
|
||||
isLoading={isLoading}
|
||||
>
|
||||
Создать
|
||||
{nameButton}
|
||||
</Button>
|
||||
</Box>
|
||||
</VStack>
|
||||
@ -343,6 +347,8 @@ const LessonList = () => {
|
||||
}}
|
||||
error={(crLQuery.error as any)?.error}
|
||||
lesson={editLesson}
|
||||
title={editLesson ? 'Редактирование лекции' : 'Создание лекции'}
|
||||
nameButton={editLesson ? 'Редактировать' : 'Создать'}
|
||||
/>
|
||||
) : (
|
||||
<Box p="2" m="2">
|
||||
|
Loading…
Reference in New Issue
Block a user