adapting namespace & refactoring few bugs

This commit is contained in:
Antoine M 2023-10-25 14:38:20 +02:00
parent 07b386d696
commit b1d8177676
6 changed files with 9 additions and 13 deletions

View File

@ -64,7 +64,7 @@ export default function Edit({ attributes, setAttributes }) {
<InspectorControls>
<PanelBody
className="homegrade-blocks-content-page-header__panel-cta"
title={__("Call to action", "homegrade-blocks__texte-fonctionnel")}
title={__("Call to action", "homegrade-blocks__texte-backoffice")}
>
<ToggleControl
label="Afficher un call to action"
@ -83,7 +83,7 @@ export default function Edit({ attributes, setAttributes }) {
label="Lien du cta"
title={__(
"Call to action",
"homegrade-blocks__texte-fonctionnel"
"homegrade-blocks__texte-backoffice"
)}
value={cta}
onChange={onChangeCTA}

View File

@ -1,3 +1,3 @@
<p <?php echo get_block_wrapper_attributes(); ?>>
<?php esc_html_e( 'Test hello from a dynamic block!', 'test' ); ?>
</p>
Test hello from a dynamic block!
</p>

View File

@ -1,3 +1,3 @@
<p <?php echo get_block_wrapper_attributes(); ?>>
<?php esc_html_e( 'Test hello from a dynamic block!', 'test' ); ?>
</p>
Test hello from a dynamic block!
</p>

View File

@ -111,7 +111,7 @@ export default function OptionsSelectControl({ setAttributes, relatedPostId }) {
return (
<InspectorControls>
<PanelBody
title={__("Question Relié", "homegrade-blocks__texte-fonctionnel")}
title={__("Question Relié", "homegrade-blocks__texte-backoffice")}
>
{/* <SelectControl
label={panelTitle}

View File

@ -8,7 +8,6 @@ import { useEffect } from "@wordpress/element";
import { decodeEntities } from "@wordpress/html-entities";
import OptionsSelectControl from "./OptionsSelectControl";
function parseBlockContentForTooltips(editorContent) {
const parser = new DOMParser();
const doc = parser.parseFromString(editorContent, "text/html");
@ -57,8 +56,6 @@ export default function Edit({ attributes, setAttributes }) {
return (
<>
<OptionsSelectControl
relatedPostId={relatedPostId}
setAttributes={setAttributes}
@ -74,7 +71,7 @@ export default function Edit({ attributes, setAttributes }) {
<p>
{__(
"Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.",
"homegrade-blocks__texte-fonctionnel"
"homegrade-blocks__texte-backoffice"
)}
</p>
</>

View File

@ -13,11 +13,11 @@ import {
ToolbarGroup,
ToolbarButton,
Button,
Tip,
} from "@wordpress/components";
import { useEffect } from "@wordpress/element";
import { MediaReplaceFlow, MediaPlaceholder } from "@wordpress/block-editor";
import { trash } from "@wordpress/icons";
import { Tip } from "@wordpress/components";
export default function Edit({ attributes, setAttributes, ...props }) {
let {
timelineStepTitle,
@ -41,7 +41,6 @@ export default function Edit({ attributes, setAttributes, ...props }) {
setAttributes({ timelineStepSubtitle });
}
function setImageAttributes(media) {
console.log(media);
if (!media || !media.url) {
setAttributes({
timelineStepImageUrl: null,