import { useEffect } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { Icon, close } from '@wordpress/icons'; import { arrow } from '@help-center/components/ai-chat/icons'; import { useAIChatStore } from '@help-center/state/ai-chat'; export const History = ({ setShowHistory }) => { const { history, setCurrentQuestion, deleteFromHistory } = useAIChatStore(); useEffect(() => { if (history.length > 0) return; // They cleared all the history setTimeout(() => setShowHistory(false), 750); }, [history, setShowHistory]); return (

{__('Chat History', 'extendify-local')}

); };