From fdb7d066e291ddd91b034d8ee698559a17e08c31 Mon Sep 17 00:00:00 2001 From: Victor Villas Date: Mon, 16 Sep 2024 11:23:33 -0700 Subject: [PATCH] Remove unnecessary async from page components --- app/(aspects)/civil/page.tsx | 2 +- app/(aspects)/coffee/page.tsx | 5 +---- app/(aspects)/outdoor/page.tsx | 2 +- app/(aspects)/tech/page.tsx | 2 +- app/(aspects)/words/page.tsx | 2 +- projects/null-cms/components/index.tsx | 2 +- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/(aspects)/civil/page.tsx b/app/(aspects)/civil/page.tsx index db31bdb..360600f 100644 --- a/app/(aspects)/civil/page.tsx +++ b/app/(aspects)/civil/page.tsx @@ -1,5 +1,5 @@ import { Index } from "@/projects/null-cms/components"; -export default async function Page() { +export default function Page() { return ; } diff --git a/app/(aspects)/coffee/page.tsx b/app/(aspects)/coffee/page.tsx index 3fabe75..360600f 100644 --- a/app/(aspects)/coffee/page.tsx +++ b/app/(aspects)/coffee/page.tsx @@ -1,8 +1,5 @@ -import path from "path"; import { Index } from "@/projects/null-cms/components"; -const cwd = path.basename(__dirname); -export default async function Page() { - console.log(__dirname) +export default function Page() { return ; } diff --git a/app/(aspects)/outdoor/page.tsx b/app/(aspects)/outdoor/page.tsx index db31bdb..360600f 100644 --- a/app/(aspects)/outdoor/page.tsx +++ b/app/(aspects)/outdoor/page.tsx @@ -1,5 +1,5 @@ import { Index } from "@/projects/null-cms/components"; -export default async function Page() { +export default function Page() { return ; } diff --git a/app/(aspects)/tech/page.tsx b/app/(aspects)/tech/page.tsx index db31bdb..360600f 100644 --- a/app/(aspects)/tech/page.tsx +++ b/app/(aspects)/tech/page.tsx @@ -1,5 +1,5 @@ import { Index } from "@/projects/null-cms/components"; -export default async function Page() { +export default function Page() { return ; } diff --git a/app/(aspects)/words/page.tsx b/app/(aspects)/words/page.tsx index db31bdb..360600f 100644 --- a/app/(aspects)/words/page.tsx +++ b/app/(aspects)/words/page.tsx @@ -1,5 +1,5 @@ import { Index } from "@/projects/null-cms/components"; -export default async function Page() { +export default function Page() { return ; } diff --git a/projects/null-cms/components/index.tsx b/projects/null-cms/components/index.tsx index 9343022..e8fbe85 100644 --- a/projects/null-cms/components/index.tsx +++ b/projects/null-cms/components/index.tsx @@ -14,7 +14,7 @@ function sanitizeBasedir(base: string): string { return sourcesBasedir; } -// dirname is evaluated as a parameter at invocation time by the invoking module +// dirname is evaluated as a parameter at invocation time by the caller module export async function Index({ base = (() => __dirname)() }: IndexProps) { const sanitizedBase = sanitizeBasedir(base); const subPages = await listPages(sanitizedBase, ".", 1);