Skip to content

Commit

Permalink
removed braces
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Mar 2, 2024
1 parent bfaeb60 commit 1bd1c22
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions website/utils/examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function getProjectExamples(projectName: string) {

const examplesPath = execSync("pnpm --filter @af-utils/examples exec pwd")
.toString()
.replace(/[\s]*$/, "/src/");
.replace(/\s*$/, "/src/");

return glob
.sync(`${examplesPath}${projectName}/**${postfix}`)
Expand All @@ -61,14 +61,14 @@ export async function getMenuMapForProjectExamples(projectName: string) {
);
}

export const getStaticParamsGenerator = (projectName: string) =>
async function () {
const examples = await getProjectExamples(projectName);
return examples.map(example => ({ example: example.slice(1) }));
};
export const getStaticParamsGenerator = (projectName: string) => async () => {
const examples = await getProjectExamples(projectName);
return examples.map(example => ({ example: example.slice(1) }));
};

export const getMetadataGenerator = (projectName: string) =>
async function ({ params }: Params) {
export const getMetadataGenerator =
(projectName: string) =>
async ({ params }: Params) => {
const title = `${startCase(params.example.toReversed().join(" "))} Example`;

let description = "";
Expand Down

0 comments on commit 1bd1c22

Please sign in to comment.