Fix wcadmin-product-usage-notice-modal react18 createroot (#50765)
This commit is contained in:
parent
6a9da36388
commit
403d78ae22
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { render } from '@wordpress/element';
|
||||
import { createRoot } from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
@ -27,7 +27,7 @@ const {
|
|||
const container = document.createElement( 'div' );
|
||||
container.setAttribute( 'id', 'woo-product-usage-notice' );
|
||||
|
||||
render(
|
||||
createRoot( document.body.appendChild( container ) ).render(
|
||||
<ProductUsageNoticeModal
|
||||
renewUrl={ renewUrl }
|
||||
subscribeUrl={ subscribeUrl }
|
||||
|
@ -41,6 +41,5 @@ render(
|
|||
colorScheme={ colorScheme }
|
||||
subscriptionState={ subscriptionState }
|
||||
screenId={ screenId }
|
||||
/>,
|
||||
document.body.appendChild( container )
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Changed from using React.render to React.createRoot for product-usage-notice-modal as it has been deprecated since React 18
|
Loading…
Reference in New Issue