From ca614e1a1ad684a3c82a760b4576cc54bc030c88 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Sun, 2 Jan 2022 15:16:07 -0500 Subject: [PATCH] consistent use of arrow functions/default exports --- components/Container.tsx | 6 +- components/Content.tsx | 6 +- components/Layout.tsx | 18 +- components/clipboard/CopyButton.tsx | 6 +- components/contact/ContactForm.tsx | 6 +- components/hits/Hits.tsx | 6 +- components/loading/Loading.tsx | 6 +- components/notes/List.tsx | 6 +- components/notes/Meta.tsx | 106 +- components/page-footer/Footer.tsx | 76 +- components/page-header/Header.tsx | 20 +- components/page-header/Menu.tsx | 36 +- components/page-header/Name.tsx | 40 +- components/page-header/ThemeToggle.tsx | 14 +- components/page/PageTitle.tsx | 6 +- components/projects/RepoCard.tsx | 138 +- components/video/FullPageVideo.tsx | 14 +- pages/_app.tsx | 6 +- pages/birthday.tsx | 78 +- pages/cli.tsx | 159 +- pages/contact.tsx | 104 +- pages/feed.atom.ts | 4 +- pages/feed.xml.ts | 4 +- pages/hillary.tsx | 136 +- pages/index.tsx | 654 ++++--- pages/leo.tsx | 138 +- pages/license.tsx | 910 +++++----- pages/notes/[slug].tsx | 92 +- pages/notes/index.tsx | 20 +- pages/previously.tsx | 426 ++--- pages/privacy.tsx | 394 ++--- pages/projects.tsx | 96 +- pages/uses.tsx | 2160 ++++++++++++------------ yarn.lock | 50 +- 34 files changed, 2956 insertions(+), 2985 deletions(-) diff --git a/components/Container.tsx b/components/Container.tsx index 063a603c..ba6fae73 100644 --- a/components/Container.tsx +++ b/components/Container.tsx @@ -10,7 +10,7 @@ type Props = { children: unknown; }; -export default function Container({ title, description, children }: Props) { +const Container = ({ title, description, children }: Props) => { const router = useRouter(); return ( @@ -27,4 +27,6 @@ export default function Container({ title, description, children }: Props) {
{children}
); -} +}; + +export default Container; diff --git a/components/Content.tsx b/components/Content.tsx index 42c1fa6a..cb347b67 100644 --- a/components/Content.tsx +++ b/components/Content.tsx @@ -4,6 +4,6 @@ type Props = { children: unknown; }; -export default function Content({ children }: Props) { - return
{children}
; -} +const Content = ({ children }: Props) =>
{children}
; + +export default Content; diff --git a/components/Layout.tsx b/components/Layout.tsx index 6b5716c7..a31bd410 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -3,12 +3,12 @@ import Footer from "./page-footer/Footer"; import styles from "./Layout.module.scss"; -export default function Layout({ children }) { - return ( - <> -
-
{children}
-