Rev 2868 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react'import { useSelector } from 'react-redux'import { Search } from '@mui/icons-material'import { debounce } from '@utils'import { useFetch, useSearchParams } from '@hooks'import Input from '@components/UI/inputs/Input'import TitleSection from '@components/UI/TitleSection'import CompaniesIFollowList from '@components/company/CompaniesIFollowList'export default function CompaniesIFollowPage() {const labels = useSelector(({ intl }) => intl.labels)const { params, setParams } = useSearchParams()const {data: companies,isLoading,refetch} = useFetch('/company/following-companies' + params)const handleSearch = debounce((value) => setParams('search', value), 500)return (<><TitleSection title={labels.companies_i_follow} /><Input icon={<Search />} onChange={handleSearch} /><CompaniesIFollowListcompanies={companies}loading={isLoading}onComplete={refetch}/></>)}