Skip to content

Commit

Permalink
refactor: Refactor LessonModal component to conditionally render a bu…
Browse files Browse the repository at this point in the history
…tton for the classic editor based on the enable_lesson_classic_editor configuration
  • Loading branch information
b-l-i-n-d committed Oct 3, 2024
1 parent a78e658 commit 9ca8386
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const LessonModal = ({
contentDripType,
}: LessonModalProps) => {
const isTutorPro = !!tutorConfig.tutor_pro_url;
const isClassicEditorEnabled = tutorConfig.enable_lesson_classic_editor === '1';
const getLessonDetailsQuery = useLessonDetailsQuery(lessonId, topicId);
const saveLessonMutation = useSaveLessonMutation(courseId);
const queryClient = useQueryClient();
Expand Down Expand Up @@ -215,7 +216,7 @@ const LessonModal = ({
label={
<>
{__('Description', 'tutor')}
{lessonId && (
{lessonId && isClassicEditorEnabled && (
<Button
variant="text"
size="small"
Expand Down

0 comments on commit 9ca8386

Please sign in to comment.