Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 43 Rev 205
Línea 42... Línea 42...
42
  const dispatch = useDispatch();
42
  const dispatch = useDispatch();
Línea 43... Línea 43...
43
 
43
 
44
  const handleConnect = (url) => {
44
  const handleConnect = (url) => {
45
    axios.post(url).then(({ data }) => {
45
    axios.post(url).then(({ data }) => {
46
      if (!data.success) {
46
      if (!data.success) {
47
        return dispatch(
47
        dispatch(
48
          addNotification({
48
          addNotification({
49
            style: "danger",
49
            style: "danger",
50
            msg:
50
            msg:
51
              typeof data.data === "string"
51
              typeof data.data === "string"
52
                ? data.data
52
                ? data.data
53
                : "Ha ocurrido un error",
53
                : "Ha ocurrido un error",
54
          })
54
          })
-
 
55
        );
55
        );
56
        return;
Línea 56... Línea 57...
56
      }
57
      }
57
 
58
 
58
      dispatch(
59
      dispatch(
59
        addNotification({
60
        addNotification({
60
          style: "success",
61
          style: "success",
61
          msg: data.data,
62
          msg: data.data,
62
        })
63
        })
-
 
64
      );
63
      );
65
      getSuggestion();
64
      return getSuggestion();
66
      return;
Línea 65... Línea 67...
65
    });
67
    });
66
  };
68
  };