import { FC, useState } from 'react' import TitleLine from '../../../components/TitleLine' import { useTranslation } from 'react-i18next' import { useGetCategoriesPublic, useGetServicesByCategory } from '../hooks/useServiceData' import { SwiperSlide, Swiper } from 'swiper/react' import { CategoryItemType, ItemServiceType } from '../types/ServiecTypes' import { clx } from '../../../helpers/utils' import ServiceItem from '../../../components/ServiceItem' const OtherServicesComponent: FC = () => { const { t } = useTranslation('global') const [categoryId, setCategoryId] = useState('') const getCategory = useGetCategoriesPublic() const getServices = useGetServicesByCategory(categoryId) return (
setCategoryId('')} className={clx( 'h-10 cursor-pointer rounded-full border-2 border-white bg-white/45 flex gap-2 justify-center items-center', '' === categoryId && 'bg-white' )}>
{t('all')}
{ getCategory.data?.data?.categories?.map((item: CategoryItemType) => { return (
setCategoryId(item.id)} className={clx( 'h-10 cursor-pointer rounded-full border-2 border-white bg-white/45 flex gap-2 justify-center items-center', item.id === categoryId && 'bg-white' )}>
{item.title}
) }) }
{ getServices.data?.data?.services?.map((item: ItemServiceType) => { return ( ) }) }
{/*
{ item.status === 'ACTIVE' ? t('active') : t('inactive') }
*/}
) } export default OtherServicesComponent