Skip to content

Commit

Permalink
Remove unnecessary async from page components
Browse files Browse the repository at this point in the history
  • Loading branch information
villasv committed Sep 16, 2024
1 parent 2c6464a commit fdb7d06
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/(aspects)/civil/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Index } from "@/projects/null-cms/components";

export default async function Page() {
export default function Page() {
return <Index />;
}
5 changes: 1 addition & 4 deletions app/(aspects)/coffee/page.tsx
Original file line number Diff line number Diff line change
@@ -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 <Index />;
}
2 changes: 1 addition & 1 deletion app/(aspects)/outdoor/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Index } from "@/projects/null-cms/components";

export default async function Page() {
export default function Page() {
return <Index />;
}
2 changes: 1 addition & 1 deletion app/(aspects)/tech/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Index } from "@/projects/null-cms/components";

export default async function Page() {
export default function Page() {
return <Index />;
}
2 changes: 1 addition & 1 deletion app/(aspects)/words/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Index } from "@/projects/null-cms/components";

export default async function Page() {
export default function Page() {
return <Index />;
}
2 changes: 1 addition & 1 deletion projects/null-cms/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fdb7d06

Please sign in to comment.