Skip to content

Commit

Permalink
Experiment with sync index component
Browse files Browse the repository at this point in the history
  • Loading branch information
villasv committed Sep 16, 2024
1 parent fdb7d06 commit 6c1f8a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions projects/null-cms/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ function sanitizeBasedir(base: string): string {
}

// dirname is evaluated as a parameter at invocation time by the caller module
export async function Index({ base = (() => __dirname)() }: IndexProps) {
export function Index({ base = (() => __dirname)() }: IndexProps) {
const sanitizedBase = sanitizeBasedir(base);
const subPages = await listPages(sanitizedBase, ".", 1);
const subPages: any[] = []; // await listPages(sanitizedBase, ".", 1);
return (
<div>
<p>{sanitizedBase}</p>
<ol>
{subPages.map((subPage, index) => (
<li key={index}>
Expand Down

0 comments on commit 6c1f8a3

Please sign in to comment.