From ecce328d968e91fb57a158218238152a00a13a02 Mon Sep 17 00:00:00 2001 From: mmtr <1233880+mmtr@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:34:55 +0200 Subject: [PATCH] Fix image in modal --- .../src/features/wpcom-global-styles/index.js | 3 --- .../src/features/wpcom-global-styles/index.php | 2 +- .../src/features/wpcom-global-styles/modal.js | 3 +-- .../src/features/wpcom-global-styles/public-path.js | 11 ----------- 4 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/public-path.js diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/index.js b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/index.js index d46be5c0c2680..6b09e813b7067 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/index.js +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/index.js @@ -1,6 +1,3 @@ -/*** THIS MUST BE THE FIRST THING EVALUATED IN THIS SCRIPT *****/ -import './public-path'; - import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import domReady from '@wordpress/dom-ready'; import { registerPlugin } from '@wordpress/plugins'; diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/index.php b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/index.php index f118a4b3272bc..c1c2cbfa3ec4b 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/index.php +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/index.php @@ -180,11 +180,11 @@ function wpcom_global_styles_enqueue_block_editor_assets() { 'wpcom-global-styles-editor', 'wpcomGlobalStyles', array( - 'assetsUrl' => plugins_url( '', __FILE__ ), 'upgradeUrl' => "$calypso_domain/plans/$site_slug?plan=value_bundle&feature=style-customization", 'wpcomBlogId' => wpcom_global_styles_get_wpcom_current_blog_id(), 'resetGlobalStylesSupportUrl' => $reset_global_styles_support_url, 'planName' => Plans::get_plan( 'value_bundle' )->product_name_short, + 'modalImage' => plugins_url( 'image.svg', __FILE__ ), ) ); wp_enqueue_style( diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/modal.js b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/modal.js index f9c050483f6f8..d2078322d8b38 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/modal.js +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/modal.js @@ -6,7 +6,6 @@ import { useDispatch, useSelect } from '@wordpress/data'; import { useEffect } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; import React from 'react'; -import image from './image.svg'; import { useCanvas } from './use-canvas'; import './modal.scss'; @@ -104,7 +103,7 @@ const GlobalStylesModal = () => {
- +
diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/public-path.js b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/public-path.js deleted file mode 100644 index 21762039d524a..0000000000000 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/public-path.js +++ /dev/null @@ -1,11 +0,0 @@ -/* exported __webpack_public_path__ */ -/* global __webpack_public_path__ */ - -/** - * Dynamically set WebPack's publicPath so that split assets can be found. - * @see https://webpack.js.org/guides/public-path/#on-the-fly - */ -if ( typeof window === 'object' && window.wpcomGlobalStyles?.assetsUrl ) { - // eslint-disable-next-line no-global-assign - __webpack_public_path__ = window.wpcomGlobalStyles.assetsUrl; -}