Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 974 Rev 975
Línea 48... Línea 48...
48
        dispatch(addNotification({ style: 'danger', msg: err.message }))
48
        dispatch(addNotification({ style: 'danger', msg: err.message }))
49
      })
49
      })
50
      .finally(() => setLoading(false))
50
      .finally(() => setLoading(false))
51
  }
51
  }
Línea 52... Línea 52...
52
 
52
 
53
  const onChangeKeyword = debounce((value) => {
53
  const onChangeKeyword = debounce((value = '') => {
54
    params.set('page', '1')
-
 
55
 
-
 
56
    if (value) {
54
    params.set('page', '1')
57
      params.set('keyword', value)
-
 
58
    } else {
-
 
59
      params.delete('keyword')
-
 
60
    }
-
 
61
 
55
    params.set('keyword', value)
62
    history.replace(`${pathname}?${params.toString()}`)
56
    history.replace(`${pathname}?${params.toString()}`)
Línea 63... Línea 57...
63
  }, 500)
57
  }, 500)
64
 
58
 
65
  const onChangePage = (currentPage = 1) => {
59
  const onChangePage = (currentPage = 1) => {
66
    params.set('page', `${currentPage}`)
60
    params.set('page', `${currentPage}`)
Línea 67... Línea 61...
67
    history.replace(`${pathname}?${params.toString()}`)
61
    history.replace(`${pathname}?${params.toString()}`)
68
  }
-
 
69
 
62
  }
70
  const onChangeCategory = (newCategory = 'user') => {
63
 
71
    console.log(params)
64
  const onChangeCategory = (newCategory = 'user') => {
Línea 72... Línea 65...
72
    params.set('page', '1')
65
    params.set('page', '1')