import React, { useEffect } from 'react'; import { useLocation } from 'react-router-dom'; import { Helmet } from 'react-helmet'; import { motion } from 'framer-motion'; import { Button } from '@/components/ui/button'; import SoundboardGrid from '@/components/SoundboardGrid'; import SpinnerWheel from '@/components/SpinnerWheel'; import BlogSection from '@/components/BlogSection'; import FartJokes from '@/components/FartJokes'; import { useTranslation } from '@/contexts/LanguageContext'; const HomePage = () => { const { t, language, languages } = useTranslation(); const location = useLocation(); useEffect(() => { // This handles scrolling when navigating from another page to a hash link on the homepage. if (location.hash) { const id = location.hash.substring(1); setTimeout(() => { const element = document.getElementById(id); if (element) { element.scrollIntoView({ behavior: 'smooth' }); } }, 100); // A small delay ensures the page has rendered. } }, [location]); const scrollTo = id => { document.getElementById(id)?.scrollIntoView({ behavior: 'smooth' }); }; const pageMeta = { title: "FartBlaze - Ultimate Free Fart Soundboard 2025 💨 | Play Funny Fart Sounds Online", description: "Play the funniest fart sounds online — wet, dry, squeaky, and epic! Free fart soundboard 2025 for pranks, Discord, and endless laughs at FartBlaze.com 💨", keywords: t('meta.home.keywords'), }; const langPrefix = language === 'en' ? '' : `/${language}`; return <> {pageMeta.title} {languages.map(lang => )}

{t('home.wetWhopperTitle')}

{t('home.languagePromoTitle')}

{t('home.languagePromoText')}

; }; export default HomePage;