Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6731 | Rev 6734 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
6727 stevensc 1
import React, { useState } from 'react'
2
import { useSelector } from 'react-redux'
3
 
4
import withSearch from '../../HOC/withSearch'
5
import TitleSection from '../../components/UI/TitleSection'
6
import ProfileItemList from '../../components/profile-item/ProfileItemList'
7
import AddProfileModal from '../../components/modals/AddProfileModal'
8
 
9
const MyProfilesPage = () => {
10
  const [isShowAddModal, setIsShowAddModal] = useState(false)
11
  const labels = useSelector(({ intl }) => intl.labels)
12
 
13
  const WithSearchConnections = withSearch(
14
    ProfileItemList,
15
    'profile/my-profiles'
16
  )
17
 
6731 stevensc 18
  const toggleModal = () => {
19
    setIsShowAddModal(!isShowAddModal)
20
  }
6727 stevensc 21
 
22
  return (
23
    <main className="companies-info container">
24
      <TitleSection
25
        title={labels.my_profiles}
6732 stevensc 26
        onAdd={toggleModal}
6727 stevensc 27
        addLabel={labels.add}
28
      />
29
      <WithSearchConnections />
6732 stevensc 30
      <AddProfileModal
31
        show={isShowAddModal}
32
        getProfiles={() => null}
33
        onHide={toggleModal}
34
      />
6727 stevensc 35
    </main>
36
  )
37
}
38
 
39
export default MyProfilesPage