learning
This commit is contained in:
@@ -111,7 +111,7 @@ const BoxNewAccessbility: FC = () => {
|
||||
</div>
|
||||
:
|
||||
getMyservices.data?.data?.subscriptions?.map((item: MyServicesItem) => {
|
||||
const active = getQuikAccess.data?.data?.quickAccesses?.find((o: any) => o.service?.id === item.plan?.service?.id) ? true : false
|
||||
const active = getQuikAccess.data?.data?.quickAccesses?.find((o: any) => o.userSubscription?.id === item?.id) ? true : false
|
||||
return (
|
||||
<div key={item.id} className='flex-1 xl:min-w-[40%] min-w-full flex justify-between items-center border-b border-[#8C90A3] border-opacity-30 py-2'>
|
||||
<div className='flex gap-4'>
|
||||
@@ -129,7 +129,7 @@ const BoxNewAccessbility: FC = () => {
|
||||
</div>
|
||||
<div>
|
||||
<ChangeQuikAccess
|
||||
id={item.plan?.service?.id}
|
||||
id={item?.id}
|
||||
value={active}
|
||||
onChange={handleQuikAccess}
|
||||
/>
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import { FC } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { ArrowLeft } from 'iconsax-react'
|
||||
import CoverImage from '../../../assets/images/banner.png'
|
||||
import { useGetLearnings } from '../../learning/hooks/useLearningData'
|
||||
import { LearningItemType } from '../../learning/types/LearningTypes'
|
||||
import moment from 'moment-jalaali'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Pages } from '../../../config/Pages'
|
||||
|
||||
const DanakLearning: FC = () => {
|
||||
|
||||
const { t } = useTranslation('global')
|
||||
const getLearnings = useGetLearnings('', 5)
|
||||
|
||||
return (
|
||||
<div className='bg-white w-sidebar text-xs hidden 2xl:block h-fit px-5 py-7 rounded-3xl'>
|
||||
@@ -13,31 +18,38 @@ const DanakLearning: FC = () => {
|
||||
<div>
|
||||
{t('home.danak_learning')}
|
||||
</div>
|
||||
<div className='flex gap-2 items-center text-[10px]'>
|
||||
<Link to={Pages.learning.list} className='flex gap-2 items-center text-[10px]'>
|
||||
<div>{t('home.see_all')}</div>
|
||||
<ArrowLeft size={12} color='black' />
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className='mt-7'>
|
||||
<div className='flex gap-3'>
|
||||
<div>
|
||||
<img src={CoverImage} alt='danak-learning-1' className='w-36 h-24 object-cover rounded-2xl' />
|
||||
</div>
|
||||
{
|
||||
getLearnings.data?.data?.learnings?.map((item: LearningItemType) => {
|
||||
return (
|
||||
<div key={item.id} className='flex gap-3'>
|
||||
<Link to={Pages.learning.detail + item.id}>
|
||||
<img src={item.coverUrl} alt='danak-learning-1' className='w-36 h-24 object-cover rounded-2xl' />
|
||||
</Link>
|
||||
|
||||
<div className='text-xs'>
|
||||
<div className='leading-5'>
|
||||
لورم ایپسوم متن ساختگی با تولید سادگی
|
||||
</div>
|
||||
<div className='flex gap-1 text-[11px] mt-3 text-description'>
|
||||
<div>دیزاین ,</div>
|
||||
<div>۲۴ دقیقه</div>
|
||||
</div>
|
||||
<div className='text-description text-[11px] mt-2'>
|
||||
آذر ماه 1403
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='text-xs'>
|
||||
<div className='leading-5'>
|
||||
{item.title}
|
||||
</div>
|
||||
<div className='flex gap-1 text-[11px] mt-3 text-description'>
|
||||
<div>{item.category.name} ,</div>
|
||||
<div>{item.videoDuration} دقیقه</div>
|
||||
</div>
|
||||
<div className='text-description text-[11px] mt-2'>
|
||||
{moment(item.createdAt).format('jYYYY/jMM/jDD')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user