| Server IP : 66.29.153.156 / Your IP : 216.73.216.226 Web Server : LiteSpeed System : Linux premium322.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64 User : lastyfjz ( 1521) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/lastyfjz/./www/wp-content/plugins/extendify/src/PageCreator/components/ |
Upload File : |
import { Button, Modal as Dialog } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { useActivityStore } from '@shared/state/activity';
const { adminUrl } = window.extSharedData;
export const ConfirmationModal = ({
setConfirmationOpen,
confirmationOpen,
setModalOpen,
}) => {
const { incrementActivity } = useActivityStore();
const confirmDeletion = () => {
setConfirmationOpen(false);
setModalOpen(true);
incrementActivity('page-creator-delete-content-button-click');
};
return (
<Dialog
onRequestClose={() => setConfirmationOpen(false)}
className="extendify-page-creator"
size="medium"
aria-labelledby="page-creator-confirmation"
role="dialog"
isOpen={confirmationOpen}
title={__('Confirmation', 'extendify-local')}>
<div className="flex flex-col space-y-6 text-sm">
<div>
{__(
'Do you want to replace existing content or create a new page?',
'extendify-local',
)}
</div>
<div className="flex w-full items-center justify-end space-x-2">
<Button size="default" variant="tertiary" onClick={confirmDeletion}>
{__('Delete existing content', 'extendify-local')}
</Button>
<Button
variant="primary"
size="default"
href={`${adminUrl}post-new.php?post_type=page&ext-open-ai-creator`}
target="_blank">
{__('Create a new page', 'extendify-local')}
</Button>
</div>
</div>
</Dialog>
);
};