Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Reference Mini Cart drawer preview dynamically (#9912)
Browse files Browse the repository at this point in the history
* Reference Mini Cart drawer preview dynamically

* Update assets/js/blocks/mini-cart/edit.tsx

Co-authored-by: Albert Juhé Lluveras <[email protected]>

---------

Co-authored-by: Albert Juhé Lluveras <[email protected]>
  • Loading branch information
2 people authored and gigitux committed Jun 20, 2023
1 parent a972c3d commit 15e8748
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assets/js/blocks/mini-cart/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import type { ReactElement } from 'react';
import { select } from '@wordpress/data';
import { cartOutline, bag, bagAlt } from '@woocommerce/icons';
import { Icon } from '@wordpress/icons';
import { WC_BLOCKS_IMAGE_URL } from '@woocommerce/block-settings';

/**
* Internal dependencies
Expand Down Expand Up @@ -163,8 +164,8 @@ const Edit = ( { attributes, setAttributes }: Props ): ReactElement => {
className="wc-block-editor-mini-cart__drawer-image"
src={
isRTL()
? '/wp-content/plugins/woocommerce-blocks/images/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-rtl.svg`
: `${ WC_BLOCKS_IMAGE_URL }blocks/mini-cart/cart-drawer.svg`
}
alt=""
/>
Expand Down

0 comments on commit 15e8748

Please sign in to comment.