Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1192 Rev 1193
Línea 24... Línea 24...
24
  const { category } = useParams()
24
  const { category } = useParams()
25
  const addressRef = useRef({})
25
  const addressRef = useRef({})
26
  const history = useHistory()
26
  const history = useHistory()
27
  const labels = useSelector(({ intl }) => intl.labels)
27
  const labels = useSelector(({ intl }) => intl.labels)
28
  const dispatch = useDispatch()
28
  const dispatch = useDispatch()
-
 
29
  const params = new URLSearchParams(search)
Línea 29... Línea 30...
29
 
30
 
30
  const onChangeKeyword = debounce((value = '') => {
31
  const onChangeKeyword = debounce((value = '') => {
31
    const params = new URLSearchParams(search)
32
    const params = new URLSearchParams(search)
32
    params.set('page', '1')
33
    params.set('page', '1')
Línea 61... Línea 62...
61
 
62
 
62
    history.replace(`${pathname}?${params.toString()}`)
63
    history.replace(`${pathname}?${params.toString()}`)
Línea 63... Línea 64...
63
  }
64
  }
64
 
-
 
65
  useEffect(() => {
-
 
66
    console.log(search)
65
 
67
 
66
  useEffect(() => {
68
    const searchEntities = async () => {
67
    const searchEntities = async () => {
69
      setLoading(true)
68
      setLoading(true)
70
      try {
69
      try {
Línea 71... Línea 70...
71
        const { data: responseData } = await axios.get(`${pathname}`)
70
        const { data: responseData } = await axios.get(`${pathname}${search}`)
72
        const { success, data } = responseData
71
        const { success, data } = responseData
73
 
72
 
Línea 92... Línea 91...
92
      <Container as='main'>
91
      <Container as='main'>
93
        <Input
92
        <Input
94
          icon={Search}
93
          icon={Search}
95
          onChange={(e) => onChangeKeyword(e.target.value)}
94
          onChange={(e) => onChangeKeyword(e.target.value)}
96
          placeholder={labels.search}
95
          placeholder={labels.search}
-
 
96
          defaultValue={params.get('keyword')}
97
        />
97
        />
Línea 98... Línea 98...
98
 
98
 
99
        <Grid container spacing={2} mt={2}>
99
        <Grid container spacing={2} mt={2}>
100
          <Grid item xs={12} md={4} display='flex' direction='column' gap={2}>
100
          <Grid item xs={12} md={4} display='flex' direction='column' gap={2}>