import React, { useEffect, useLayoutEffect } from 'react'; import Navbar from '@/src/components/Navbar.tsx'; import Sidebar from '@/src/components/Sidebar.tsx'; import Footer from '@/src/components/Footer.tsx'; import TipsCategory from '@/src/components/TipsCategory.tsx'; import FAQItem from '@/src/components/FAQItem.tsx'; import { CONTENT } from '../constants.ts'; import { useLanguage } from '@/src/contexts/LanguageContext.tsx'; import { useTheme } from '@/src/contexts/ThemeContext.tsx'; import { useLocation } from 'react-router-dom'; const Guide: React.FC = () => { const { language } = useLanguage(); const { guideHeroImage } = useTheme(); const location = useLocation(); const t = CONTENT[language]; useLayoutEffect(() => { const params = new URLSearchParams(location.search); const section = params.get('section'); let elementId = ''; if (section === 'tips') { elementId = 'guide-tips'; } else if (section === 'faq') { elementId = 'guide-faq'; } if (elementId) { const element = document.getElementById(elementId); if (element) { element.scrollIntoView({ behavior: 'smooth' }); } } }, [location.search]); return (
{/* Hero Section */}
Travel Guide { const target = e.target as HTMLImageElement; target.src = "https://images.unsplash.com/photo-1578474843222-9593bc88d8b0?q=80&w=1920&auto=format&fit=crop"; }} />

{t.guide.hero.title}

{t.guide.hero.subtitle}

{/* Main Content */}
{/* Travel Tips Section */}
{t.guide.tips.sectionTitle}

{t.guide.tips.sectionSubtitle}

{t.guide.tips.categories.map((category) => ( ))}
{/* FAQ Section */} {/*
*/}
{t.guide.faq.sectionTitle}

{t.guide.faq.sectionSubtitle}

{t.guide.faq.items.map((faq) => ( ))}
); }; export default Guide;