Skip to content

Commit a880629

Browse files
committed
fix: move links and stacks data outside components
1 parent dd2e30e commit a880629

File tree

3 files changed

+193
-203
lines changed

3 files changed

+193
-203
lines changed

components/Footer.tsx

Lines changed: 48 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -29,59 +29,54 @@ const FooterGrid = styled.div`
2929
justify-content: center;
3030
`;
3131

32-
const Footer = (): JSX.Element => {
33-
const links = React.useMemo(
34-
() => [
35-
{
36-
url: 'https://github.com/shellbear',
37-
icon: SiGithub,
38-
},
39-
{
40-
url: 'https://twitter.com/_shellbear',
41-
icon: SiTwitter,
42-
},
43-
{
44-
url: 'mailto:hello@shellbear.me',
45-
icon: MdMail,
46-
},
47-
{
48-
url: 'https://www.malt.fr/profile/antoineordonez',
49-
icon: Malt,
50-
},
51-
{
52-
url: 'https://linkedin.com/in/antoine-ordonez',
53-
icon: SiLinkedin,
54-
},
55-
{
56-
url: 'https://instagram.com/croissant2france',
57-
icon: Instagram,
58-
},
59-
],
60-
[],
61-
);
32+
const links = [
33+
{
34+
url: 'https://github.com/shellbear',
35+
icon: SiGithub,
36+
},
37+
{
38+
url: 'https://twitter.com/_shellbear',
39+
icon: SiTwitter,
40+
},
41+
{
42+
url: 'mailto:hello@shellbear.me',
43+
icon: MdMail,
44+
},
45+
{
46+
url: 'https://www.malt.fr/profile/antoineordonez',
47+
icon: Malt,
48+
},
49+
{
50+
url: 'https://linkedin.com/in/antoine-ordonez',
51+
icon: SiLinkedin,
52+
},
53+
{
54+
url: 'https://instagram.com/croissant2france',
55+
icon: Instagram,
56+
},
57+
];
6258

63-
return (
64-
<StyledFooter>
65-
<Container paddingY="25px">
66-
<Grid gridGap="30px">
67-
<Link href="/">Home</Link>
68-
<Link href="/about">About</Link>
69-
<Link href="/projects">Projects</Link>
70-
<Link href="mailto:hello@shellbear.me">Contact</Link>
71-
</Grid>
72-
</Container>
73-
<FooterGrid>
74-
{links.map(({ url, icon: Icon }) => (
75-
<Link key={url} target="_blank" opacity={0.7} href={url}>
76-
<Icon size={22} />
77-
</Link>
78-
))}
79-
</FooterGrid>
80-
<Text margin={0} fontSize="0.9rem" color="rgba(0, 0, 0, 0.7)">
81-
© {new Date().getFullYear()} Antoine Ordonez
82-
</Text>
83-
</StyledFooter>
84-
);
85-
};
59+
const Footer = (): JSX.Element => (
60+
<StyledFooter>
61+
<Container paddingY="25px">
62+
<Grid gridGap="30px">
63+
<Link href="/">Home</Link>
64+
<Link href="/about">About</Link>
65+
<Link href="/projects">Projects</Link>
66+
<Link href="mailto:hello@shellbear.me">Contact</Link>
67+
</Grid>
68+
</Container>
69+
<FooterGrid>
70+
{links.map(({ url, icon: Icon }) => (
71+
<Link key={url} target="_blank" opacity={0.7} href={url}>
72+
<Icon size={22} />
73+
</Link>
74+
))}
75+
</FooterGrid>
76+
<Text margin={0} fontSize="0.9rem" color="rgba(0, 0, 0, 0.7)">
77+
© {new Date().getFullYear()} Antoine Ordonez
78+
</Text>
79+
</StyledFooter>
80+
);
8681

8782
export default Footer;

0 commit comments

Comments
 (0)