fix courseId undefined
This commit is contained in:
parent
40214cef3f
commit
cb60801a74
@ -119,7 +119,6 @@ export const Item: React.FC<ItemProps> = ({
|
||||
onCancel={() => {
|
||||
setEdit(false)
|
||||
}}
|
||||
courseId={courseId}
|
||||
lesson={{ _id: id, id, name, date }}
|
||||
title={t('journal.pl.lesson.editTitle')}
|
||||
nameButton={t('journal.pl.save')}
|
||||
|
@ -46,6 +46,7 @@ import { dateToCalendarFormat } from '../../../utils/time'
|
||||
import { Lesson } from '../../../__data__/model'
|
||||
import { ErrorSpan } from '../style'
|
||||
import { api } from '../../../__data__/api/api'
|
||||
import { useParams } from 'react-router-dom'
|
||||
|
||||
const courceNameSuggestion = getFeatures('journal')['courceNameSuggestion']
|
||||
|
||||
@ -57,7 +58,6 @@ interface NewLessonForm {
|
||||
|
||||
interface LessonFormProps {
|
||||
lesson?: Partial<Lesson> | any // Разрешаем передавать как Lesson, так и AI-сгенерированный урок
|
||||
courseId: string
|
||||
isLoading: boolean
|
||||
onCancel: () => void
|
||||
onSubmit: (lesson: Lesson) => void
|
||||
@ -74,7 +74,6 @@ interface LessonFormProps {
|
||||
|
||||
export const LessonForm = ({
|
||||
lesson,
|
||||
courseId,
|
||||
isLoading,
|
||||
onCancel,
|
||||
onSubmit,
|
||||
@ -88,6 +87,7 @@ export const LessonForm = ({
|
||||
onRetryAiGeneration = () => {},
|
||||
existingLessons
|
||||
}: LessonFormProps) => {
|
||||
const { courseId } = useParams()
|
||||
const { t } = useTranslation()
|
||||
const isAiSuggested = lesson && !lesson._id && !lesson.id
|
||||
const aiHighlightColor = useColorModeValue('blue.100', 'blue.800')
|
||||
|
Loading…
x
Reference in New Issue
Block a user