PHP 8.2.31
Preview: HelpCenter.jsx Size: 1.20 KB
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/extendify_old/src/HelpCenter/HelpCenter.jsx

import { Modal } from '@help-center/components/modal/Modal';
import { GuidedTour } from '@help-center/components/tours/GuidedTour';
import { useRouter } from '@help-center/hooks/useRouter';
import { useGlobalSyncStore } from '@help-center/state/globals-sync';
import { useEffect } from '@wordpress/element';
import { AnimatePresence } from 'framer-motion';

export const HelpCenter = () => {
	// register a custom event to hide the Help Center.
	const { setVisibility, visibility } = useGlobalSyncStore();
	const { navigateTo } = useRouter();

	useEffect(() => {
		const handleOpen = (event) => {
			event?.detail?.page && navigateTo(event.detail.page);
			setVisibility('open');
		};
		const handleMinimize = () => {
			if (visibility !== 'open') return;
			setVisibility('minimized');
		};

		window.addEventListener('extendify-hc:open', handleOpen);
		window.addEventListener('extendify-hc:minimize', handleMinimize);
		return () => {
			window.removeEventListener('extendify-hc:open', handleOpen);
			window.removeEventListener('extendify-hc:minimize', handleMinimize);
		};
	}, [setVisibility, visibility, navigateTo]);

	return (
		<>
			<AnimatePresence>
				<Modal />
			</AnimatePresence>
			<GuidedTour />
		</>
	);
};

Directory Contents

Dirs: 6 × Files: 4

Name Size Perms Modified Actions
- drwxr-xr-x 2026-04-28 02:40:01
Edit Download
hooks DIR
- drwxr-xr-x 2026-04-28 02:40:01
Edit Download
lib DIR
- drwxr-xr-x 2026-04-28 02:40:01
Edit Download
pages DIR
- drwxr-xr-x 2026-04-28 02:40:01
Edit Download
state DIR
- drwxr-xr-x 2026-04-28 02:40:01
Edit Download
tours DIR
- drwxr-xr-x 2026-04-28 02:40:01
Edit Download
1.42 KB lrw-r--r-- 2026-02-19 03:27:14
Edit Download
637 B lrw-r--r-- 2026-02-19 03:27:14
Edit Download
671 B lrw-r--r-- 2026-02-19 03:27:14
Edit Download
1.20 KB lrw-r--r-- 2026-02-19 03:27:14
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).