127 lines
6.5 KiB
TypeScript
127 lines
6.5 KiB
TypeScript
import { Carousel } from '@material-tailwind/react'
|
||
import { FC, Fragment } from 'react'
|
||
import { useTranslation } from 'react-i18next'
|
||
import BannerImage from '../../assets/images/banner2.jpeg'
|
||
import RobotImage from '../../assets/images/robot.jpeg'
|
||
import { ArrowLeft } from 'iconsax-react'
|
||
import TitleLine from '../../components/TitleLine'
|
||
import { useGetSuggestedServices } from './hooks/useServiceData'
|
||
import PageLoading from '../../components/PageLoading'
|
||
import { ItemServiceType } from './types/ServiecTypes'
|
||
import ServiceItem from '../../components/ServiceItem'
|
||
import OtherServicesComponent from './components/OtherServices'
|
||
|
||
|
||
const OtherServices: FC = () => {
|
||
|
||
const { t } = useTranslation('global')
|
||
|
||
const getSuggestedServices = useGetSuggestedServices()
|
||
|
||
|
||
|
||
|
||
|
||
return (
|
||
<div className='w-full flex gap-6'>
|
||
<div className='flex-1'>
|
||
{
|
||
getSuggestedServices.isPending ?
|
||
<PageLoading />
|
||
:
|
||
<Fragment>
|
||
<Carousel autoplay className="rounded-xl h-fit dltr" placeholder="" onPointerEnterCapture={() => { }} onPointerLeaveCapture={() => { }} >
|
||
<div className='relative drtl'>
|
||
<img src={BannerImage} className='w-full max-h-[300px] h-full object-cover rounded-3xl' />
|
||
<div className='absolute bg-black bg-opacity-20 size-full top-0 right-0 py-6 px-8 flex flex-col justify-between'>
|
||
<button className="px-8 w-fit py-1.5 bg-white bg-opacity-10 text-white text-sm rounded-full shadow-md ">
|
||
{t('home.new')}
|
||
</button>
|
||
|
||
<div className='max-w-[340px] font-medium text-white text-lg leading-10'>
|
||
<div>
|
||
سفارش نرمافزار اختصاصی: سرمایهای برای آینده یا فقط هزینهای برای امروز؟
|
||
</div>
|
||
<div className='mt-3 text-border text-xs'>
|
||
۸ دقیقه مطالعه
|
||
</div>
|
||
<button className='mt-3 px-4 h-9 flex gap-2 items-center text-xs rounded-2.5 bg-black text-white'>
|
||
<div>
|
||
{t('home.study')}
|
||
</div>
|
||
<ArrowLeft size={14} color='white' />
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div className='relative drtl'>
|
||
<img src={BannerImage} className='w-full max-h-[300px] object-cover rounded-3xl' />
|
||
<div className='absolute bg-black bg-opacity-20 size-full top-0 right-0 py-6 px-8 flex flex-col justify-between'>
|
||
<button className="px-8 w-fit py-1.5 bg-white bg-opacity-10 text-white text-sm rounded-full shadow-md ">
|
||
{t('home.new')}
|
||
</button>
|
||
|
||
<div className='max-w-[340px] font-medium text-white text-lg leading-10'>
|
||
<div>
|
||
سفارش نرمافزار اختصاصی: سرمایهای برای آینده یا فقط هزینهای برای امروز؟
|
||
</div>
|
||
<div className='mt-3 text-border text-xs'>
|
||
۸ دقیقه مطالعه
|
||
</div>
|
||
<button className='mt-3 px-4 h-9 flex gap-2 items-center text-xs rounded-2.5 bg-black text-white'>
|
||
<div>
|
||
{t('home.study')}
|
||
</div>
|
||
<ArrowLeft size={14} color='white' />
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</Carousel>
|
||
|
||
|
||
<div className='w-full mt-8'>
|
||
<TitleLine title={t('service.selected_danak')} />
|
||
</div>
|
||
|
||
<div className='flex flex-wrap xl:gap-6 gap-4 items-center mt-8'>
|
||
{
|
||
getSuggestedServices.data?.data?.danakServices?.map((item: ItemServiceType) => (
|
||
<ServiceItem
|
||
key={item.id}
|
||
item={item}
|
||
/>
|
||
))
|
||
}
|
||
<div className='flex-1 min-w-[40%] xl:min-w-[30%] xl:p-6 p-4'></div>
|
||
</div>
|
||
|
||
|
||
|
||
<OtherServicesComponent />
|
||
|
||
|
||
|
||
<div className='h-16 xl:hidden'></div>
|
||
</Fragment>
|
||
}
|
||
|
||
|
||
</div>
|
||
<div className='bg-white w-sidebar h-fit hidden xl:block rounded-3xl overflow-hidden relative'>
|
||
<img
|
||
src={RobotImage}
|
||
className='w-full backdrop-blur-[100px] h-[550px] object-cover'
|
||
/>
|
||
|
||
<div className='absolute flex items-center px-4 w-full bottom-0 h-[86px] bg-black bg-opacity-5 backdrop-blur-[14px]'>
|
||
<div className='max-w-[80%] text-sm leading-6 text-white'>
|
||
سفارش نرمافزار اختصاصی: سرمایهای برای آینده یا فقط هزینهای برای امروز؟
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
)
|
||
}
|
||
|
||
export default OtherServices |