import './App.css'; import {AwesomeButton, AwesomeButtonSocial} from 'react-awesome-button'; import AwesomeButtonStyle from "react-awesome-button/dist/styles.css"; import data from './roots.json' function App() { var res; const socialTypes = ["facebook", "instagram", "twitter", "github", "youtube", "linkedin", "pinterest", "messenger", "whatsapp"]; return (

{data.title}

{data.links.map((rootDetail, index)=>{ if(socialTypes.includes(rootDetail.type)) { res = } else if (rootDetail.type === "basic") { res = } else { // throw "One of your roots has an unrecognized type. Check out the documentation for the supported types."; } return res; })}
); } export default App;