Skip to content

Commit

Permalink
teste generate static parms
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-logan committed May 29, 2024
1 parent 425c4d1 commit 0e817d6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/src/app/teste/[userId]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export async function generateStaticParams(context: any) {
const usersId: string[] = ["1", "2", "3", "de", "en", "pt"];

return usersId.map((userId) => {
return {
userId,
};
});
}

interface PageProps {
params: { userId: string };
}

export default function Page({ params: { userId } }: PageProps) {
return (
<div className="min-h-screen">
<h1>{userId}</h1>
</div>
);
}

0 comments on commit 0e817d6

Please sign in to comment.