← All changes
|
assets/src/apps/js/blocks/course-elements/course-price/edit.js
+22
-22
4.3.9
→
4.4.9
View file →
| @@ -1,22 +1,22 @@ | ||
| 1 | -import { __ } from '@wordpress/i18n'; | |
| 2 | -import { useBlockProps } from '@wordpress/block-editor'; | |
| 3 | -import { RawHTML } from '@wordpress/element'; | |
| 4 | - | |
| 5 | -const Edit = ( props ) => { | |
| 6 | - const { attributes, setAttributes, context } = props; | |
| 7 | - const blockProps = useBlockProps(); | |
| 8 | - const { lpCourseData } = context; | |
| 9 | - const coursePrice = | |
| 10 | - lpCourseData?.price || | |
| 11 | - '<span class="course-price"><span class="course-item-price"> <span class="origin-price">$5.00</span><span class="price">$4.00</span> </span></span>'; | |
| 12 | - | |
| 13 | - return ( | |
| 14 | - <> | |
| 15 | - <div { ...blockProps }> | |
| 16 | - <RawHTML>{ coursePrice }</RawHTML> | |
| 17 | - </div> | |
| 18 | - </> | |
| 19 | - ); | |
| 20 | -}; | |
| 21 | - | |
| 22 | -export default Edit; | |
| 1 | +import { __ } from '@wordpress/i18n'; | |
| 2 | +import { useBlockProps } from '@wordpress/block-editor'; | |
| 3 | +import { RawHTML } from '@wordpress/element'; | |
| 4 | + | |
| 5 | +const Edit = ( props ) => { | |
| 6 | + const { attributes, setAttributes, context } = props; | |
| 7 | + const blockProps = useBlockProps(); | |
| 8 | + const { lpCourseData } = context; | |
| 9 | + const coursePrice = | |
| 10 | + lpCourseData?.price || | |
| 11 | + '<span class="course-price"><span class="course-item-price"> <span class="origin-price">$5.00</span><span class="price">$4.00</span> </span></span>'; | |
| 12 | + | |
| 13 | + return ( | |
| 14 | + <> | |
| 15 | + <div { ...blockProps }> | |
| 16 | + <RawHTML>{ coursePrice }</RawHTML> | |
| 17 | + </div> | |
| 18 | + </> | |
| 19 | + ); | |
| 20 | +}; | |
| 21 | + | |
| 22 | +export default Edit; | |