Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2864 | Rev 2875 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2864 Rev 2873
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { useSelector } from 'react-redux'
2
import { useSelector } from 'react-redux'
3
import { Search } from '@mui/icons-material'
3
import { Search } from '@mui/icons-material'
Línea 4... Línea 4...
4
 
4
 
5
import { debounce, jsonToParams } from '../../utils'
5
import { debounce } from '@utils'
Línea 6... Línea 6...
6
import { useFetch, useSearchParams } from '@hooks'
6
import { useFetch, useSearchQuery } from '@hooks'
7
 
7
 
8
import Spinner from '../../components/UI/Spinner'
8
import Spinner from '../../components/UI/Spinner'
9
import Input from '../../components/UI/inputs/Input'
9
import Input from '../../components/UI/inputs/Input'
10
import ProfileItem from '../../components/profile/ProfileItem'
10
import ProfileItem from '../../components/profile/ProfileItem'
11
import EmptySection from '../../components/UI/EmptySection'
11
import EmptySection from '../../components/UI/EmptySection'
Línea 12... Línea 12...
12
import TitleSection from '../../components/UI/TitleSection'
12
import TitleSection from '../../components/UI/TitleSection'
13
import PaginationComponent from '../../components/UI/PaginationComponent'
13
import PaginationComponent from '../../components/UI/PaginationComponent'
14
 
14
 
15
const ImpersonatePage = () => {
15
const ImpersonatePage = () => {
16
  const { setParams, params } = useSearchParams()
-
 
17
  const { data, isLoading } = useFetch(
16
  const { getParam, setParam } = useSearchQuery()
18
    `/impersonate?${jsonToParams(params)}`,
17
  const { data, isLoading } = useFetch(
Línea 19... Línea 18...
19
    {}
18
    '/impersonate?search=' + getParam('search')
Línea 20... Línea 19...
20
  )
19
  )
21
  const labels = useSelector(({ intl }) => intl.labels)
20
  const labels = useSelector(({ intl }) => intl.labels)
22
 
21
 
Línea 55... Línea 54...
55
        </ul>
54
        </ul>
56
      )}
55
      )}
57
      <PaginationComponent
56
      <PaginationComponent
58
        pages={data.total?.pages}
57
        pages={data.total?.pages}
59
        currentActivePage={data.current?.page}
58
        currentActivePage={data.current?.page}
60
        onChangePage={(newPage) => setParams('page', newPage)}
59
        onChangePage={(newPage) => setParam('page', newPage)}
61
        isRow
60
        isRow
62
      />
61
      />
63
    </>
62
    </>
64
  )
63
  )
65
}
64
}