Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6731 | Ir a la última revisión | | 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
 
18
  const toggleModal = () => setIsShowAddModal(!isShowAddModal)
19
 
20
  return (
21
    <main className="companies-info container">
22
      <TitleSection
23
        title={labels.my_profiles}
24
        onAdd={toggleModal}
25
        addLabel={labels.add}
26
      />
27
      <WithSearchConnections />
28
      <AddProfileModal />
29
    </main>
30
  )
31
}
32
 
33
export default MyProfilesPage