import { FC, useState } from 'react' import { useTranslation } from 'react-i18next' import { Link } from 'react-router-dom' import { Pages } from '../../config/Pages' import Button from '../../components/Button' import { Add } from 'iconsax-react' import { useGetLearning } from './hooks/useLearningData' import PageLoading from '../../components/PageLoading' import Td from '../../components/Td' import { LearningItemType } from './types/LearningTypes' import Pagination from '../../components/Pagination' const LearningList: FC = () => { const { t } = useTranslation('global') const [page, setPage] = useState(1) const getLearning = useGetLearning(page) return (
{t('learning.list_learning')}
{ getLearning.isPending ? :
{ getLearning.data?.data?.learnings?.map((item: LearningItemType) => { return ( ) }) }
}
) } export default LearningList