Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 5768 | Rev 5774 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

import axios from 'axios'
import React, { useEffect, useState } from 'react'

const ProfileView = ({ urlVars }) => {

  const {
    routeWebsite,
    routeCompanySize,
    routeIndustry,
    routeExtended,
    routeSocialNetworks,
    routeLocationAdd,
    routeFoundationYear,
    routeImageUpload,
    routeCoverUpload,
    routeFooterUpload,
    routeHeaderUpload,
    companyId,
    cover
  } = urlVars

  const [coverPath, setCoverPath] = useState('');

  const getData = async (url) => {
    try {
      const { data } = await axios.get(url)

      return data.data
    }
    catch (err) {
      console.log(err)
    }
  }

  useEffect(() => {
    getData(routeCoverUpload)
      .then(resp => console.log(resp))
      .catch(err => console.log(err))

  }, []);

  return (
    <>
      <section className="content-header">
        <div className="container-fluid">
          <div className="row mb-2">
            <div className="col-sm-12">
              <h1>Perfil</h1>
            </div>
          </div>
        </div>
      </section>
    </>
  )
}

export default ProfileView