Reference Mini Cart drawer preview dynamically (https://github.com/woocommerce/woocommerce-blocks/pull/9912)
* Reference Mini Cart drawer preview dynamically * Update assets/js/blocks/mini-cart/edit.tsx Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> --------- Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
This commit is contained in:
parent
df5f1d21d1
commit
532393fe07
|
@ -26,6 +26,7 @@ import { select } from '@wordpress/data';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { cartOutline, bag, bagAlt } from '@woocommerce/icons';
|
import { cartOutline, bag, bagAlt } from '@woocommerce/icons';
|
||||||
import { Icon } from '@wordpress/icons';
|
import { Icon } from '@wordpress/icons';
|
||||||
|
import { WC_BLOCKS_IMAGE_URL } from '@woocommerce/block-settings';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
|
@ -237,8 +238,8 @@ const Edit = ( {
|
||||||
className="wc-block-editor-mini-cart__drawer-image"
|
className="wc-block-editor-mini-cart__drawer-image"
|
||||||
src={
|
src={
|
||||||
isRTL()
|
isRTL()
|
||||||
? '/wp-content/plugins/woocommerce-blocks/images/blocks/mini-cart/cart-drawer-rtl.svg'
|
? `${ WC_BLOCKS_IMAGE_URL }blocks/mini-cart/cart-drawer-rtl.svg`
|
||||||
: '/wp-content/plugins/woocommerce-blocks/images/blocks/mini-cart/cart-drawer.svg'
|
: `${ WC_BLOCKS_IMAGE_URL }blocks/mini-cart/cart-drawer.svg`
|
||||||
}
|
}
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue