@@ -2,7 +2,6 @@ import React from "react";
2
2
import { Col , Row } from "reactstrap" ;
3
3
import { SITE_TITLE , siteSpecific , SOCIAL_LINKS } from "../../../services" ;
4
4
import { ExternalLink } from "../ExternalLink" ;
5
- import chunk from 'lodash/chunk' ;
6
5
7
6
const getSocialIcon = ( name : string ) => {
8
7
if ( name === "x (twitter)" ) {
@@ -12,7 +11,7 @@ const getSocialIcon = (name: string) => {
12
11
} ;
13
12
14
13
export const SocialLinksRow = ( ) => {
15
- const linksByColumn = chunk ( Object . entries ( SOCIAL_LINKS ) , 2 ) ;
14
+ const links = Object . entries ( SOCIAL_LINKS ) ;
16
15
return (
17
16
< div className = 'footer-links footer-links-social' >
18
17
{
@@ -21,14 +20,12 @@ export const SocialLinksRow = () => {
21
20
< >
22
21
< h5 > Get social</ h5 >
23
22
< Row >
24
- { linksByColumn . map ( ( column , index ) => (
25
- < Col key = { index } >
26
- { column . map ( ( [ _ , { name, href} ] ) =>
27
- < ExternalLink href = { href } key = { name } >
28
- < img src = { getSocialIcon ( name . toLowerCase ( ) ) } alt = { `${ SITE_TITLE } on ${ name } ` }
29
- className = 'social-logo' />
30
- </ ExternalLink >
31
- ) }
23
+ { links . map ( ( [ _ , { name, href} ] , index ) => (
24
+ < Col key = { index } className = "col-4" >
25
+ < ExternalLink href = { href } key = { name } >
26
+ < img src = { getSocialIcon ( name . toLowerCase ( ) ) } alt = { `${ SITE_TITLE } on ${ name } ` }
27
+ className = 'social-logo' />
28
+ </ ExternalLink >
32
29
</ Col >
33
30
) ) }
34
31
</ Row >
@@ -37,7 +34,7 @@ export const SocialLinksRow = () => {
37
34
< >
38
35
< h2 > Get social</ h2 >
39
36
< div className = 'mt-1 text-nowrap' >
40
- { Object . entries ( SOCIAL_LINKS ) . map ( ( [ _ , { name, href} ] ) =>
37
+ { links . map ( ( [ _ , { name, href} ] ) =>
41
38
< div className = { "me-3 d-inline-block" } key = { name } >
42
39
< ExternalLink href = { href } >
43
40
< img src = { getSocialIcon ( name . toLowerCase ( ) ) } alt = { `${ SITE_TITLE } on ${ name } ` }
0 commit comments