REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.77 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/extendify_old/src/PageCreator/components/MainButton.jsx
Text
Base64
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> </> ); };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
content
DIR
-
drwxr-xr-x
2026-04-28 02:40:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
topbar
DIR
-
drwxr-xr-x
2026-04-28 02:40:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ConfirmationModal.jsx
1.43 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MainButton.jsx
1.77 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Modal.jsx
6.95 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RetryNotice.jsx
563 B
lrw-r--r--
2025-03-13 21:10:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).