Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1847 Rev 1902
Línea 8... Línea 8...
8
import { addNotification } from '../../redux/notification/notification.actions'
8
import { addNotification } from '../../redux/notification/notification.actions'
Línea 9... Línea 9...
9
 
9
 
10
import Modal from 'components/UI/modal/Modal'
10
import Modal from 'components/UI/modal/Modal'
11
import ConfirmModal from 'components/modals/ConfirmModal'
11
import ConfirmModal from 'components/modals/ConfirmModal'
12
import ImageModal from 'components/modals/ImageModal'
-
 
13
import CoverModal from 'components/cover/CoverModal'
12
import ImageModal from 'components/modals/ImageModal'
-
 
13
import OverviewModal from 'components/overview/OverviewModal'
Línea 14... Línea 14...
14
import OverviewModal from 'components/overview/OverviewModal'
14
import Cover from '../UI/cover/Cover'
15
 
15
 
16
const ProfileCard = ({
16
const ProfileCard = ({
17
  full_name: fullName = '',
17
  full_name: fullName = '',
Línea 39... Línea 39...
39
  const [isAdded, setIsAdded] = useState(false)
39
  const [isAdded, setIsAdded] = useState(false)
40
  const [connectionUrl, setConnectionUrl] = useState('')
40
  const [connectionUrl, setConnectionUrl] = useState('')
41
  const [modalToShow, setModalToShow] = useState(null)
41
  const [modalToShow, setModalToShow] = useState(null)
42
  const [settedOverview, setSettedOverview] = useState('')
42
  const [settedOverview, setSettedOverview] = useState('')
43
  const [profileImg, setProfileImg] = useState('')
43
  const [profileImg, setProfileImg] = useState('')
44
  const [coverImg, setCoverImg] = useState('')
-
 
45
  const [isModalShow, setIsModalShow] = useState(false)
44
  const [isModalShow, setIsModalShow] = useState(false)
46
  const [isEdit, setIsEdit] = useState(false)
45
  const [isEdit, setIsEdit] = useState(false)
47
  const labels = useSelector(({ intl }) => intl.labels)
46
  const labels = useSelector(({ intl }) => intl.labels)
48
  const { pathname } = useLocation()
47
  const { pathname } = useLocation()
49
  const dispatch = useDispatch()
48
  const dispatch = useDispatch()
Línea 95... Línea 94...
95
 
94
 
96
  useEffect(() => {
95
  useEffect(() => {
97
    setIsAdded(!request_connection)
96
    setIsAdded(!request_connection)
98
    setSettedOverview(overview)
97
    setSettedOverview(overview)
99
    setProfileImg(image)
-
 
100
    setCoverImg(cover)
98
    setProfileImg(image)
Línea 101... Línea 99...
101
  }, [request_connection, overview, image, cover])
99
  }, [request_connection, overview, image])
102
 
100
 
103
  useEffect(() => {
101
  useEffect(() => {
104
    RequestConnectionUrl
102
    RequestConnectionUrl
Línea 111... Línea 109...
111
  }, [pathname])
109
  }, [pathname])
Línea 112... Línea 110...
112
 
110
 
113
  return (
111
  return (
114
    <>
112
    <>
115
      <section className='profile__user-card'>
-
 
116
        <div className='cover__image-container'>
-
 
117
          <img alt='Background Image' src={coverImg} />
-
 
118
          {isEdit && (
113
      <section className='profile__user-card'>
119
            <button
-
 
120
              className='button-icon cover__edit-btn'
-
 
121
              onClick={() => setModalToShow('cover')}
114
        <Cover
122
            >
115
          cover={cover}
123
              <EditIcon />
116
          sizes={sizes?.cover}
124
            </button>
117
          edit={isEdit}
125
          )}
118
          editUrl={`/profile/my-profiles/cover/${profileId}/operation/upload`}
126
        </div>
119
        />
127
        <section className='px-4 pb-4'>
120
        <section className='px-4 pb-4'>
128
          <div className='card__image-options'>
121
          <div className='card__image-options'>
129
            <img
122
            <img
130
              alt='Profile Image'
123
              alt='Profile Image'
Línea 223... Línea 216...
223
            overview={settedOverview}
216
            overview={settedOverview}
224
            id={profileId}
217
            id={profileId}
225
            closeModal={() => closeModal()}
218
            closeModal={() => closeModal()}
226
            onComplete={(newOverview) => setSettedOverview(newOverview)}
219
            onComplete={(newOverview) => setSettedOverview(newOverview)}
227
          />
220
          />
228
          <CoverModal
-
 
229
            isOpen={modalToShow === 'cover'}
-
 
230
            sizes={sizes?.cover}
-
 
231
            onClose={() => closeModal()}
-
 
232
            onComplete={(newImage) => setCoverImg(newImage)}
-
 
233
          />
-
 
234
          <ImageModal
221
          <ImageModal
235
            show={modalToShow === 'image'}
222
            show={modalToShow === 'image'}
236
            id={profileId}
223
            id={profileId}
237
            sizes={sizes?.image}
224
            sizes={sizes?.image}
238
            onClose={() => closeModal()}
225
            onClose={() => closeModal()}