import React from 'react'
import {
FaUsers,
FaAward,
FaClock,
FaGlobe
} from 'react-icons/fa';
import { useLocalization } from '@/utils/hooks/useLocalization'
import { useCountUp } from '@/utils/hooks/useCountUp'
import { Helmet } from 'react-helmet'
import { IconType } from 'react-icons'
interface StatItem {
icon: IconType
value: string | number
labelKey: string
useCounter?: boolean
counterEnd?: number
counterSuffix?: string
counterDuration?: number
}
interface ContentSection {
key: string
descKey: string
}
interface AboutPageData {
stats: StatItem[]
descriptions: string[]
sections: ContentSection[]
}
const About: React.FC = () => {
const { translate } = useLocalization()
// About page data configuration
const aboutPageData: AboutPageData = {
stats: [
{
icon: FaUsers,
value: 300,
labelKey: '::Public.about.stats.clients',
useCounter: true,
counterEnd: 300,
counterSuffix: '+',
counterDuration: 2500
},
{
icon: FaAward,
value: 20,
labelKey: '::Public.about.stats.experience',
useCounter: true,
counterEnd: 20,
counterSuffix: '+',
counterDuration: 2000
},
{
icon: FaClock,
value: '7/24',
labelKey: '::Public.about.stats.support',
useCounter: false
},
{
icon: FaGlobe,
value: 3,
labelKey: '::Public.about.stats.countries',
useCounter: true,
counterEnd: 3,
counterDuration: 1500
}
],
descriptions: [
'::Public.about.description.part1',
'::Public.about.description.motto',
'::Public.about.description.part2',
'::Public.about.description.closing'
],
sections: [
{
key: '::Public.about.mission',
descKey: '::Public.about.mission.desc'
},
{
key: '::Public.about.vision',
descKey: '::Public.about.vision.desc'
}
]
}
// Counter animations based on data
const clientsCount = useCountUp({
end: aboutPageData.stats[0].counterEnd!,
suffix: aboutPageData.stats[0].counterSuffix,
duration: aboutPageData.stats[0].counterDuration!
})
const experienceCount = useCountUp({
end: aboutPageData.stats[1].counterEnd!,
suffix: aboutPageData.stats[1].counterSuffix,
duration: aboutPageData.stats[1].counterDuration!
})
const countriesCount = useCountUp({
end: aboutPageData.stats[3].counterEnd!,
duration: aboutPageData.stats[3].counterDuration!
})
return (
<>
{translate('::Public.about.subtitle')}
{translate(aboutPageData.descriptions[0])}
{translate(aboutPageData.descriptions[1])}
{translate(aboutPageData.descriptions[2])}
{translate(aboutPageData.descriptions[3])}
{translate(section.descKey)}