$65 GRAYBYTE WORDPRESS FILE MANAGER $59

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/dantho.rw/wp-content/plugins/extendify/src/Agent/components/buttons/

HOME
Current File : /home/bravrvjk/dantho.rw/wp-content/plugins/extendify/src/Agent/components/buttons//PostEditor.jsx
import { Button } from '@wordpress/components';
import { useEffect, useState, useRef } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import classNames from 'classnames';
import { magicAnimated, magic } from '@agent/icons';
import { useGlobalStore } from '@agent/state/global';

export const PostEditor = () => {
	const { toggleOpen, open, isMobile } = useGlobalStore();
	const [animate, setAnimate] = useState(false);
	const [animateIcon, setAnimateIcon] = useState(false);
	const pageLoaded = useRef(false);

	useEffect(() => {
		// Don't run this on the first page load
		if (!pageLoaded.current) {
			pageLoaded.current = true;
			return;
		}
		if (open || isMobile) return;
		setAnimate(true);
		setAnimateIcon(true);
		const id = setTimeout(() => {
			setAnimate(false);
		}, 1500);
		const iconId = setTimeout(() => {
			setAnimateIcon(false);
		}, 5000);
		return () => {
			clearTimeout(id);
			clearTimeout(iconId);
		};
	}, [open, isMobile]);

	if (isMobile) return null;

	return (
		<Button
			variant="primary"
			icon={animateIcon ? magicAnimated : magic}
			iconPosition="left"
			className="is-compact has-text relative z-10"
			onClick={() => {
				if (open) setAnimate(true);
				toggleOpen();
			}}
			aria-label={__('Open Agent', 'extendify-local')}>
			<span
				className={classNames('px-1 leading-none', {
					'extendify-gradient-animation': animate,
				})}>
				{__('AI Agent', 'extendify-local')}
			</span>
		</Button>
	);
};


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
6 Nov 2025 10.43 AM
bravrvjk / bravrvjk
0755
AdminBar.jsx
1.795 KB
1 Sep 2025 7.55 PM
bravrvjk / bravrvjk
0644
Mobile.jsx
1.681 KB
23 Oct 2025 8.20 PM
bravrvjk / bravrvjk
0644
PostEditor.jsx
1.438 KB
1 Sep 2025 7.55 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF