diff --git a/components/Blog/Layout.tsx b/components/Blog/Layout.tsx index 6d64f10..eb66697 100644 --- a/components/Blog/Layout.tsx +++ b/components/Blog/Layout.tsx @@ -11,6 +11,8 @@ interface ILayoutProps { } const Layout: NextPage = ({ title, children }) => { + const socialLinks = socials("1.1em").map((social, i) => {social.icon}); + return <> {title ?? "c0ntroller.de"} @@ -29,10 +31,7 @@ const Layout: NextPage = ({ title, children }) => { © 2022 Daniel Kluge | - {socials("1.1em").map((social, i) => <> - {i !== 0 ? | : null} - {social.icon} - )} + {socialLinks.flatMap((social, i) => i !== 0 ? [|, social] : [social])} | Contact diff --git a/pages/terminal.tsx b/pages/terminal.tsx index 1f08b8e..5939cff 100644 --- a/pages/terminal.tsx +++ b/pages/terminal.tsx @@ -56,6 +56,8 @@ const Terminal: NextPage<{ buildTime: string }> = ({ buildTime }) => { const iconSize = "1.3em"; + const socialLinks = socials(iconSize, "var(--repl_color)").map((social, i) => {social.icon}); + return (
c0ntroller.de @@ -72,10 +74,7 @@ const Terminal: NextPage<{ buildTime: string }> = ({ buildTime }) => { | | - {socials(iconSize, "var(--repl_color)").map((social, i) => <> - {i !== 0 ? | : null} - {social.icon} - )} + {socialLinks.flatMap((social, i) => i !== 0 ? [|, social] : [social])}