import { createElement, Component, createRef, useState, useEffect, useRef, } from '@wordpress/element' import { __, sprintf } from 'ct-i18n' import $ from 'jquery' const NotificationBlocksDrop = ({ initialStatus, url, pluginUrl, pluginLink, }) => { const [pluginStatus, setPluginStatus] = useState('installed') const [isLoading, setIsLoading] = useState(false) const containerEl = useRef(null) useEffect(() => { setPluginStatus(initialStatus) }, []) const dismiss = () => { containerEl.current.closest('.notice').remove() $.ajax(ajaxurl, { type: 'POST', data: { action: 'blocksy_dismissed_blocks_move_notice_handler', }, }) } return (

{__( 'Heads up - theme blocks are going to be moved into the Blocksy Companion plugin soon', 'blocksy' )}

' + __( 'No need to worry, as if you were using any of our theme (Gutenberg) blocks you just need to activate the Blocksy Companion plugin to restore them.', 'blocksy' ), }} />

{__('Why you need Blocksy Companion?', 'blocksy')}
) } export default NotificationBlocksDrop