Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 2044 Rev 2243
Línea 1... Línea 1...
1
import React from "react";
1
import React from "react";
2
import { useState, useEffect } from "react";
2
import { useState, useEffect } from "react";
3
import { Button, Modal } from "react-bootstrap";
3
import { Button, Modal } from "react-bootstrap";
4
import { useForm } from "react-hook-form";
4
import { useForm } from "react-hook-form";
5
import styled from "styled-components";
5
import styled from "styled-components";
6
import {axios} from "../../../../../utils";
6
import { axios } from "../../../../../utils";
7
import {CKEditor} from "ckeditor4-react";
7
import { CKEditor } from "ckeditor4-react";
8
import FormErrorFeedback from "../../../../../shared/form-error-feedback/FormErrorFeedback";
8
import FormErrorFeedback from "../../../../../shared/form-error-feedback/FormErrorFeedback";
9
import Spinner from "../../../../../shared/loading-spinner/Spinner";
9
import Spinner from "../../../../../shared/loading-spinner/Spinner";
-
 
10
import { CKEDITOR_OPTIONS } from "../../../../../utils";
10
import parse from "html-react-parser";
11
import parse from "html-react-parser";
Línea 11... Línea 12...
11
 
12
 
12
const StyledSpinnerContainer = styled.div`
13
const StyledSpinnerContainer = styled.div`
13
  position: absolute;
14
  position: absolute;
Línea 58... Línea 59...
58
  const onSubmitHandler = async (data) => {
59
  const onSubmitHandler = async (data) => {
59
    // profile/my-profiles/extended', [ 'id' => $user_profile_id_encrypted]
60
    // profile/my-profiles/extended', [ 'id' => $user_profile_id_encrypted]
60
    // https://leaderslinked.com/profile/my-profiles/extended/MzU4NDg3ODcg
61
    // https://leaderslinked.com/profile/my-profiles/extended/MzU4NDg3ODcg
61
    setLoading(true);
62
    setLoading(true);
62
    const formData = new FormData();
63
    const formData = new FormData();
63
     (data);
64
    (data);
64
    Object.entries(data).map(([key, value]) => {
65
    Object.entries(data).map(([key, value]) => {
65
      formData.append(key, value);
66
      formData.append(key, value);
66
    });
67
    });
67
    await axios
68
    await axios
68
      .post(`/group/my-groups/extended/${groupId}`, formData)
69
      .post(`/group/my-groups/extended/${groupId}`, formData)
69
      .then((response) => {
70
      .then((response) => {
70
        const resData = response.data;
71
        const resData = response.data;
71
         (resData);
72
        (resData);
72
        if (resData.success) {
73
        if (resData.success) {
73
          setSettedOverview(resData.data);
74
          setSettedOverview(resData.data);
74
          handleModalOpen();
75
          handleModalOpen();
75
        } else {
76
        } else {
76
          const resError = resData.data;
77
          const resError = resData.data;