import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useAuth } from '../contexts/AuthContext'; import Sidebar from '../components/figma/Sidebar'; interface FAQItem { question: string; answer: string; isOpen: boolean; } const HelpNew: React.FC = () => { const { user } = useAuth(); const navigate = useNavigate(); const [faqItems, setFaqItems] = useState([ { question: "What is the process for submitting a support ticket?", answer: "Team members will undergo evaluations every three months, focusing on their performance, teamwork, and communication skills. Role advancements will be considered at these intervals.", isOpen: true }, { question: "How can I reset my password?", answer: "To reset your password, click on the 'Forgot Password' link on the login page and follow the instructions sent to your email address.", isOpen: false }, { question: "What are the criteria for performance reviews?", answer: "Performance reviews are based on multiple factors including goal achievement, collaboration, innovation, and adherence to company values. Reviews are conducted quarterly with detailed feedback sessions.", isOpen: false }, { question: "How can I access the company's training resources?", answer: "Training resources are available through our internal learning portal. You can access them from the main dashboard under the 'Learning & Development' section.", isOpen: false }, { question: "What should I do if I encounter a technical issue?", answer: "For technical issues, first check our troubleshooting guide. If the issue persists, contact our IT support team through the help desk or email support@company.com.", isOpen: false }, { question: "How do I provide feedback on team projects?", answer: "Feedback can be provided through our project management system or during regular team meetings. We encourage constructive feedback that helps improve project outcomes.", isOpen: false } ]); const toggleFAQ = (index: number) => { setFaqItems(prev => prev.map((item, i) => ({ ...item, isOpen: i === index ? !item.isOpen : item.isOpen }))); }; const handleContactUs = () => { // In a real app, this would open a contact form or support chat alert('Contact functionality would be implemented here'); }; if (!user) { navigate('/login'); return null; } return (
Help & Support
{faqItems.map((item, index) => (
toggleFAQ(index)} className="self-stretch px-3 py-2 inline-flex justify-start items-center gap-2 cursor-pointer" >
{item.question}
{item.isOpen ? ( ) : ( )}
{item.isOpen && (
{item.answer}
)}
))}
Still have questions?
We are available for 24/7
Contact Us
); }; export default HelpNew;