Does anyone know how I can implement a Font Awesome social icon in my footer as I have it setup?
export const FooterItems = [
{
title: '',
url: '/',
cName: 'footer-links',
icon: <FontAwesomeIcon icon={['fab', 'github']} size="2x"/>
},
{
title: 'View',
url: '/view',
cName: 'footer-links'
},
This is obviously not working I just wanted to show what I am trying to do. Here is my footer.js file
import React from "react";
import { FooterItems } from "./FooterItems";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import './Footer.css'
class Footer extends React.Component {
state = { clicked: false }
handleClick = () => {
this.setState({ clicked: !this.state.clicked })
}
render() {
return (
<footer className="FooterItems">
<div>
<FontAwesomeIcon icon={['fab', 'github']} size="2x"/>
<FontAwesomeIcon icon={['fab', 'facebook']} size="2x"/>
<FontAwesomeIcon icon={['fab', 'twitter']} size="2x"/>
<FontAwesomeIcon icon={['fab', 'instagram']} size="2x"/>
</div>
<ul className={this.state.clicked ? 'footer-menu active' : 'footer-menu'}>
{FooterItems.map((item, index) => {
return (
<li key={index}>
<a className={item.cName} href={item.url}>
{item.title}{item.icon}
</a>
</li>
)
})}
</ul>
</footer>
)
}
}
export default Footer
The icons are displaying here so is it easier to do it this way? If so ho would I add the Link
to them here?