Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3183 Rev 3184
Línea 25... Línea 25...
25
const ShareModal = () => {
25
const ShareModal = () => {
26
  const [showConfirm, setShowConfirm] = useState(false)
26
  const [showConfirm, setShowConfirm] = useState(false)
27
  const labels = useSelector(({ intl }) => intl.labels)
27
  const labels = useSelector(({ intl }) => intl.labels)
28
  const dispatch = useDispatch()
28
  const dispatch = useDispatch()
Línea -... Línea 29...
-
 
29
 
-
 
30
  const {
-
 
31
    show,
-
 
32
    modalType,
29
 
33
    feedType,
-
 
34
    feedSharedId,
-
 
35
    postUrl,
-
 
36
    closeModal,
30
  const { show, modalType, feedType, feedSharedId, postUrl, closeModal } =
37
    openModal
Línea 31... Línea 38...
31
    useShareModal()
38
  } = useShareModal()
32
 
39
 
33
  const {
40
  const {
34
    control,
41
    control,
Línea 80... Línea 87...
80
      dispatch(addNotification({ style: 'danger', msg: error.message }))
87
      dispatch(addNotification({ style: 'danger', msg: error.message }))
81
    }
88
    }
82
  })
89
  })
Línea 83... Línea 90...
83
 
90
 
84
  const handleClose = () => {
91
  const handleClose = () => {
85
    if (description || file) return toggleConfirm()
92
    if (description || file) toggleConfirm()
86
    closeModal()
93
    closeModal()
Línea 87... Línea 94...
87
  }
94
  }
88
 
95
 
-
 
96
  const handleConfirm = () => {
89
  const handleConfirm = () => {
97
    reset()
90
    reset()
98
    toggleConfirm()
Línea -... Línea 99...
-
 
99
    closeModal()
-
 
100
  }
-
 
101
 
-
 
102
  const handleCancel = () => {
-
 
103
    toggleConfirm()
91
    closeModal()
104
    openModal({ url: postUrl, modalType, feedType })
92
  }
105
  }
93
 
106
 
94
  return (
107
  return (
95
    <>
108
    <>
Línea 142... Línea 155...
142
        )}
155
        )}
143
      </Modal>
156
      </Modal>
144
      <ConfirmModal
157
      <ConfirmModal
145
        show={showConfirm}
158
        show={showConfirm}
146
        onAccept={handleConfirm}
159
        onAccept={handleConfirm}
147
        onClose={toggleConfirm}
160
        onClose={handleCancel}
148
        message='¿Estás seguro de que quieres salir sin publicar tu post?'
161
        message='¿Estás seguro de que quieres salir sin publicar tu post?'
149
      />
162
      />
150
    </>
163
    </>
151
  )
164
  )
152
}
165
}