From e61ca889a7543ac77b9dd837060c28371dbb281c Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Wed, 12 Mar 2025 18:10:11 -0400 Subject: [PATCH] consistent arrow functions --- .env.example | 2 +- app/api/hits/route.ts | 6 ++--- app/birthday/page.tsx | 6 +++-- app/contact/actions.ts | 8 +++---- app/contact/form.tsx | 2 +- app/contact/page.tsx | 6 +++-- app/hillary/page.tsx | 6 +++-- app/layout.tsx | 13 ++++++++--- app/leo/page.tsx | 6 +++-- app/manifest.ts | 2 +- app/not-found.tsx | 6 +++-- app/notes/[slug]/page.tsx | 16 +++++++------ app/notes/page.tsx | 10 ++++---- app/page.tsx | 6 +++-- app/previously/page.tsx | 9 ++++---- app/projects/page.tsx | 14 +++++++----- app/robots.ts | 2 +- app/sitemap.ts | 2 +- app/zip/page.tsx | 6 +++-- components/Blockquote/Blockquote.tsx | 4 +++- components/CodeInline/CodeInline.tsx | 4 +++- components/CodePen/CodePen.tsx | 4 +--- components/Comments/Comments.tsx | 2 +- components/Footer/Footer.tsx | 4 ++-- components/Gist/Gist.tsx | 5 ++-- components/Header/Header.tsx | 2 +- components/HorizontalRule/HorizontalRule.tsx | 4 +++- components/Link/Link.tsx | 2 +- contexts/ThemeContext.tsx | 3 ++- lib/config/{constants.ts => index.ts} | 5 ++-- lib/helpers/build-feed.ts | 2 +- lib/helpers/format-date.ts | 2 +- lib/helpers/posts.ts | 2 +- mdx-components.ts | 4 ++-- middleware.ts | 15 +++++------- next.config.ts | 24 ++++++-------------- notes/dark-mode/index.mdx | 1 - public/humans.txt | 6 ++--- public/security.txt | 24 -------------------- 39 files changed, 121 insertions(+), 126 deletions(-) rename lib/config/{constants.ts => index.ts} (90%) delete mode 100644 public/security.txt diff --git a/.env.example b/.env.example index 4b0ca7a1..1563be05 100644 --- a/.env.example +++ b/.env.example @@ -15,7 +15,7 @@ NEXT_PUBLIC_UMAMI_WEBSITE_ID= # optional. the base URL of a self-hosted Umami instance (including https://) to proxy requests to. if the website ID is # set but this isn't, the managed Umami Cloud endpoint is used. # https://umami.is/docs/bypass-ad-blockers -NEXT_PUBLIC_UMAMI_HOST= +NEXT_PUBLIC_UMAMI_URL= # optional. enables comments on blog posts via GitHub discussions. # https://giscus.app/ diff --git a/app/api/hits/route.ts b/app/api/hits/route.ts index 69955c7a..90b39b41 100644 --- a/app/api/hits/route.ts +++ b/app/api/hits/route.ts @@ -4,12 +4,12 @@ import type { hits as Hits } from "@prisma/client"; export const revalidate = 900; // 15 mins -export async function GET(): Promise< +export const GET = async (): Promise< NextResponse<{ total: Pick; pages: Hits[]; }> -> { +> => { // fetch all rows from db sorted by most hits const pages = await prisma.hits.findMany({ orderBy: [ @@ -28,4 +28,4 @@ export async function GET(): Promise< }); return NextResponse.json({ total, pages }); -} +}; diff --git a/app/birthday/page.tsx b/app/birthday/page.tsx index 45553c5c..10dfee9d 100644 --- a/app/birthday/page.tsx +++ b/app/birthday/page.tsx @@ -20,7 +20,7 @@ export const metadata: Metadata = { }, }; -export default function Page() { +const Page = () => { return ( <> 1996.mov @@ -28,4 +28,6 @@ export default function Page() {