Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6395 Rev 6396
Línea 4... Línea 4...
4
import { connect } from 'react-redux'
4
import { connect } from 'react-redux'
Línea 5... Línea 5...
5
 
5
 
Línea 6... Línea 6...
6
import { addNotification } from '../../../redux/notification/notification.actions'
6
import { addNotification } from '../../../redux/notification/notification.actions'
-
 
7
 
Línea 7... Línea 8...
7
 
8
import styles from './survey.module.scss'
8
import styles from './survey.module.scss'
9
import { updateFeed } from '../../../redux/feed/feed.actions'
9
 
10
 
10
const SurveyForm = ({
11
const SurveyForm = ({
Línea 29... Línea 30...
29
      .then(({ data: response }) => {
30
      .then(({ data: response }) => {
30
        const { success, data } = response
31
        const { success, data } = response
31
        if (!success) {
32
        if (!success) {
32
          addNotification({ style: 'danger', msg: `Error: ${data}` })
33
          addNotification({ style: 'danger', msg: `Error: ${data}` })
33
          setIsActive(true)
34
          setIsActive(true)
34
          return
-
 
35
        }
35
        }
Línea 36... Línea 36...
36
 
36
 
37
        addNotification({ style: 'success', msg: data })
37
        updateFeed({ feed: data, uuid: data.uuid })
38
      })
38
      })
39
      .catch((err) => {
39
      .catch((err) => {
40
        addNotification({ style: 'danger', msg: `Error: ${err}` })
40
        addNotification({ style: 'danger', msg: `Error: ${err}` })
41
        setIsActive(true)
41
        setIsActive(true)