Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1233 Rev 1234
Línea 34... Línea 34...
34
 
34
 
35
const ShareComponent = ({ feedType, postUrl = '', image = '' }) => {
35
const ShareComponent = ({ feedType, postUrl = '', image = '' }) => {
36
  const labels = useSelector(({ intl }) => intl.labels)
36
  const labels = useSelector(({ intl }) => intl.labels)
Línea 37... Línea 37...
37
  const dispatch = useDispatch()
37
  const dispatch = useDispatch()
Línea 38... Línea 38...
38
 
38
 
39
  const { control, formState } = useForm()
39
  const { control, watch } = useForm()
40
 
40
 
Línea 41... Línea 41...
41
  const onClickHandler = (postType) => {
41
  const onClickHandler = (postType) => {
-
 
42
    dispatch(openShareModal(postUrl, postType, feedType))
42
    dispatch(openShareModal(postUrl, postType, feedType))
43
  }
-
 
44
 
-
 
45
  useEffect(() => {
-
 
46
    const subscription = watch((value, { name, type }) =>
43
  }
47
      console.log(value, name, type)
Línea 44... Línea 48...
44
 
48
    )
45
  useEffect(() => {
49
 
46
    console.log(formState)
50
    return () => subscription.unsubscribe()
47
  }, [formState])
51
  }, [watch])