PluginProbe
Extendify / 3.2.3
Extendify v3.2.3
3.2.3 3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 All 129 releases
extendify / src / Agent / workflows / settings / components / UpdateSearchIndexingConfirm.jsx

UpdateSearchIndexingConfirm.jsx in Extendify 3.2.3, at src/Agent/workflows/settings/components/UpdateSearchIndexingConfirm.jsx

55 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2
3 export const UpdateSearchIndexingConfirm = ({
4 inputs,
5 onConfirm,
6 onCancel,
7 }) => {
8 const willEnable = inputs?.indexing
9 ? inputs.indexing === 'enabled'
10 : Boolean(window.extAgentData?.agentContext?.searchEnginesBlocked);
11
12 const handleConfirm = () => {
13 onConfirm({
14 data: { indexing: willEnable ? 'enabled' : 'disabled' },
15 shouldRefreshPage: true,
16 });
17 };
18
19 return (
20 <div className="mb-4 ms-2 me-2 flex flex-col rounded-lg border border-gray-300 bg-gray-50">
21 <div className="rounded-lg border-b border-gray-300 bg-white">
22 <div className="p-3">
23 <p className="m-0 p-0 text-sm text-gray-900">
24 {willEnable
25 ? __(
26 'Search engines will be allowed to index your site. Confirm to let them find it.',
27 'extendify-local',
28 )
29 : __(
30 'Search engines will be asked not to index your site. Visitors can still see it. Confirm to discourage indexing.',
31 'extendify-local',
32 )}
33 </p>
34 </div>
35 </div>
36 <div className="flex justify-start gap-2 p-3">
37 <button
38 type="button"
39 className="w-full rounded-sm border border-gray-500 bg-white p-2 text-sm text-gray-900"
40 onClick={onCancel}
41 >
42 {__('Cancel', 'extendify-local')}
43 </button>
44 <button
45 type="button"
46 className="w-full rounded-sm border border-design-main bg-design-main p-2 text-sm text-white"
47 onClick={handleConfirm}
48 >
49 {__('Confirm', 'extendify-local')}
50 </button>
51 </div>
52 </div>
53 );
54 };
55