import { useState } from 'react' import { motion, AnimatePresence } from 'framer-motion' import { useTranslation } from 'react-i18next' import './Testimonials.css' function Testimonials() { const { t } = useTranslation() const [currentIndex, setCurrentIndex] = useState(0) const articles = [ { title: t('news.articles.abha.title'), source: t('news.articles.abha.source'), date: '14 Oct 2024', snippet: t('news.articles.abha.snippet'), link: 'https://pib.gov.in/PressReleaseIframePage.aspx?PRID=2064531' }, { title: t('news.articles.nppa.title'), source: t('news.articles.nppa.source'), date: '9 Dec 2025', snippet: t('news.articles.nppa.snippet'), link: 'https://pib.gov.in/PressReleasePage.aspx?PRID=2087562' }, { title: t('news.articles.ocr.title'), source: t('news.articles.ocr.source'), date: '12 Dec 2024', snippet: t('news.articles.ocr.snippet'), link: 'https://www.healthcareittoday.com/2024/12/12/ocr-transforms-healthcare-document-management/' } ] const handlePrevious = () => { setCurrentIndex((prev) => (prev === 0 ? articles.length - 1 : prev - 1)) } const handleNext = () => { setCurrentIndex((prev) => (prev === articles.length - 1 ? 0 : prev + 1)) } return (
{t('news.label')}

{articles[currentIndex].title}

{articles[currentIndex].source} {articles[currentIndex].date}

{articles[currentIndex].snippet}

{t('news.readMore')} →
) } export default Testimonials