Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 650 Rev 651
Línea 1... Línea 1...
1
import React, { useState, useRef, useEffect } from 'react'
1
import React, { useState, useEffect } from 'react'
2
import { useDispatch } from 'react-redux'
2
import { useDispatch, useSelector } from 'react-redux'
3
import { addNotification } from '../../redux/notification/notification.actions'
3
import { addNotification } from '../../redux/notification/notification.actions'
4
import { Col, Container, Row } from 'react-bootstrap'
4
import { Col, Container, Row } from 'react-bootstrap'
5
import { useHistory, useLocation, useParams } from 'react-router-dom'
5
import { useHistory, useLocation, useParams } from 'react-router-dom'
6
import { axios, debounce, jsonToParams } from '../../utils'
6
import { axios, debounce, jsonToParams } from '../../utils'
7
import SearchIcon from '@mui/icons-material/Search'
7
import SearchIcon from '@mui/icons-material/Search'
Línea 21... Línea 21...
21
  const [category, setCategory] = useState('user')
21
  const [category, setCategory] = useState('user')
22
  const [entity, setEntity] = useState('')
22
  const [entity, setEntity] = useState('')
23
  const [address, setAddress] = useState({})
23
  const [address, setAddress] = useState({})
24
  const [currentPage, setCurrentPage] = useState(1)
24
  const [currentPage, setCurrentPage] = useState(1)
25
  const [pages, setPages] = useState(1)
25
  const [pages, setPages] = useState(1)
26
  const { search } = useLocation()
26
  const labels = useSelector(({ intl }) => intl.labels)
27
  const { category: categoryParam } = useParams()
27
  const { category: categoryParam } = useParams()
28
  const history = useHistory()
28
  const { search } = useLocation()
29
  const dispatch = useDispatch()
29
  const dispatch = useDispatch()
-
 
30
  const history = useHistory()
Línea 30... Línea 31...
30
 
31
 
31
  const params = new URLSearchParams(search)
32
  const params = new URLSearchParams(search)
Línea 32... Línea 33...
32
  const keyword = params.get('keyword')
33
  const keyword = params.get('keyword')
Línea 79... Línea 80...
79
      <Container as='main'>
80
      <Container as='main'>
80
        <Input
81
        <Input
81
          icon={SearchIcon}
82
          icon={SearchIcon}
82
          onChange={(e) => onSearch(e.target.value)}
83
          onChange={(e) => onSearch(e.target.value)}
83
          defaultValue={entity}
84
          defaultValue={entity}
-
 
85
          placeholder={labels.search}
84
        />
86
        />
85
        <Row className='mt-3'>
87
        <Row className='mt-3'>
86
          <Col as='aside' md='4'>
88
          <Col as='aside' md='4'>
87
            <FiltersSidebar>
89
            <FiltersSidebar>
88
              <CategoryFilter
90
              <CategoryFilter