diff --git a/src/components/atoms/LinkIcon.jsx b/src/components/atoms/LinkIcon.jsx
index af1c407..9acfad8 100644
--- a/src/components/atoms/LinkIcon.jsx
+++ b/src/components/atoms/LinkIcon.jsx
@@ -7,6 +7,9 @@ import { ReactComponent as Info } from '../../images/info.svg'
import { ReactComponent as Styleguide } from '../../images/styleguide.svg'
import { ReactComponent as GitHub } from '../../images/github.svg'
import { ReactComponent as Dribbble } from '../../images/dribbble.svg'
+import { ReactComponent as Email } from '../../images/email.svg'
+import { ReactComponent as Blog } from '../../images/blog.svg'
+import { ReactComponent as Twitter } from '../../images/twitter.svg'
const LinkIcon = ({ title, type, ...props }) => {
let typeOrTitle = type ? type : title
@@ -30,6 +33,12 @@ const LinkIcon = ({ title, type, ...props }) => {
case 'styleguide':
case 'Styleguide':
return
+ case 'Email':
+ return
+ case 'Blog':
+ return
+ case 'Twitter':
+ return
default:
return null
}
diff --git a/src/components/atoms/LinkIcon.test.jsx b/src/components/atoms/LinkIcon.test.jsx
index 5d33c62..1971160 100644
--- a/src/components/atoms/LinkIcon.test.jsx
+++ b/src/components/atoms/LinkIcon.test.jsx
@@ -24,6 +24,15 @@ describe('LinkIcon', () => {
rerender()
expect(container.firstChild.nodeName).toBe('svg')
+
+ rerender()
+ expect(container.firstChild.nodeName).toBe('svg')
+
+ rerender()
+ expect(container.firstChild.nodeName).toBe('svg')
+
+ rerender()
+ expect(container.firstChild.nodeName).toBe('svg')
})
it('does not render with unknown type', () => {
diff --git a/src/components/molecules/Networks.jsx b/src/components/molecules/Networks.jsx
index f08325e..cfa6332 100644
--- a/src/components/molecules/Networks.jsx
+++ b/src/components/molecules/Networks.jsx
@@ -4,13 +4,7 @@ import { StaticQuery, graphql } from 'gatsby'
import posed from 'react-pose'
import classNames from 'classnames'
import { moveInTop } from '../atoms/Transitions'
-
-import { ReactComponent as Email } from '../../images/email.svg'
-import { ReactComponent as Blog } from '../../images/blog.svg'
-import { ReactComponent as Twitter } from '../../images/twitter.svg'
-import { ReactComponent as GitHub } from '../../images/github.svg'
-import { ReactComponent as Dribbble } from '../../images/dribbble.svg'
-
+import LinkIcon from '../atoms/LinkIcon'
import icons from '../atoms/Icons.module.scss'
import styles from './Networks.module.scss'
@@ -28,29 +22,6 @@ const query = graphql`
}
`
-class NetworkIcon extends PureComponent {
- static propTypes = {
- title: PropTypes.string
- }
-
- render() {
- switch (this.props.title) {
- case 'Email':
- return
- case 'Blog':
- return
- case 'Twitter':
- return
- case 'GitHub':
- return
- case 'Dribbble':
- return
- default:
- return null
- }
- }
-}
-
export default class Networks extends PureComponent {
static propTypes = {
minimal: PropTypes.bool,
@@ -86,7 +57,7 @@ export default class Networks extends PureComponent {
href={meta.social[key]}
key={i}
>
-
+
{key}
))}