Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/blocksy-companion-pro/static/js/notifications.js

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + import { createElement, createRoot } from '@wordpress/element'
2 + import VersionMismatchNotice from './notifications/VersionMismatchNotice'
3 + import $ from 'jquery'
4 +
5 + export const mount = (el) => {
6 + if (el.querySelector('.notice-blocksy-theme-version-mismatch')) {
7 + const container = el.querySelector(
8 + '.notice-blocksy-theme-version-mismatch'
9 + )
10 +
11 + const root = createRoot(
12 + el.querySelector('.notice-blocksy-theme-version-mismatch')
13 + )
14 + root.render(
15 + <VersionMismatchNotice
16 + mismatched_version_descriptor={{
17 + productName: container.dataset.productName,
18 + slug: container.dataset.slug,
19 + }}
20 + />
21 + )
22 + }
23 + }
24 +
25 + document.addEventListener('DOMContentLoaded', () => {
26 + mount(document.body)
27 + })
28 +