Rev 5746 | Rev 5751 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import axios from 'axios'
import { async } from 'postcss-js'
import React, { useEffect } from 'react'
const ProfileView = ({ urlVars }) => {
const {
routeWebsite,
routeCompanySize,
routeIndustry,
routeExtended,
routeSocialNetworks,
routeLocationAdd,
routeFoundationYear,
routeImageUpload,
routeCoverUpload,
routeFooterUpload,
routeHeaderUpload,
} = urlVars
const getData = async (url) => {
try {
const { data } = await axios.get(url)
if (data.success) {
return data.data
} else {
return data.messages
}
}
catch (err) {
console.log(err)
}
}
useEffect(() => {
getData(routeSocialNetworks)
.then(resp => console.log(resp))
.catch(err => console.log(err))
}, []);
return (
<div></div>
)
}
export default ProfileView