← All changes
|
assets/src/apps/js/blocks/course-elements/course-description/edit.js
+21
-21
4.3.8
→
4.4.9
View file →
| @@ -1,21 +1,21 @@ | ||
| 1 | -import { __ } from '@wordpress/i18n'; | |
| 2 | -import { useBlockProps } from '@wordpress/block-editor'; | |
| 3 | - | |
| 4 | -export const edit = ( props ) => { | |
| 5 | - const { attributes, setAttributes, context } = props; | |
| 6 | - const blockProps = useBlockProps(); | |
| 7 | - const { lpCourseData } = context; | |
| 8 | - const courseDescription = | |
| 9 | - lpCourseData?.description || | |
| 10 | - '<h3>Description</h3> <div className="lp-course-description"> <p>Ullo fecit epicurus necesse manilium plebiscito intrandum facto sequamur habemus nostrane adipiscing vocatur poterit caeleste</p> <p>Beatus neget maximarum superiores dacere veriusque isto anquam congressu reprehendi</p></div>'; | |
| 11 | - return ( | |
| 12 | - <> | |
| 13 | - <div | |
| 14 | - { ...blockProps } | |
| 15 | - dangerouslySetInnerHTML={ { | |
| 16 | - __html: courseDescription, | |
| 17 | - } } | |
| 18 | - ></div> | |
| 19 | - </> | |
| 20 | - ); | |
| 21 | -}; | |
| 1 | +import { __ } from '@wordpress/i18n'; | |
| 2 | +import { useBlockProps } from '@wordpress/block-editor'; | |
| 3 | + | |
| 4 | +export const edit = ( props ) => { | |
| 5 | + const { attributes, setAttributes, context } = props; | |
| 6 | + const blockProps = useBlockProps(); | |
| 7 | + const { lpCourseData } = context; | |
| 8 | + const courseDescription = | |
| 9 | + lpCourseData?.description || | |
| 10 | + '<h3>Description</h3> <div className="lp-course-description"> <p>Ullo fecit epicurus necesse manilium plebiscito intrandum facto sequamur habemus nostrane adipiscing vocatur poterit caeleste</p> <p>Beatus neget maximarum superiores dacere veriusque isto anquam congressu reprehendi</p></div>'; | |
| 11 | + return ( | |
| 12 | + <> | |
| 13 | + <div | |
| 14 | + { ...blockProps } | |
| 15 | + dangerouslySetInnerHTML={ { | |
| 16 | + __html: courseDescription, | |
| 17 | + } } | |
| 18 | + ></div> | |
| 19 | + </> | |
| 20 | + ); | |
| 21 | +}; | |