From 0e817d6824d03280afd01d2e18801ea265e74d4d Mon Sep 17 00:00:00 2001 From: gabriel-logan Date: Wed, 29 May 2024 17:02:49 -0300 Subject: [PATCH] teste generate static parms --- docs/src/app/teste/[userId]/page.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/src/app/teste/[userId]/page.tsx diff --git a/docs/src/app/teste/[userId]/page.tsx b/docs/src/app/teste/[userId]/page.tsx new file mode 100644 index 0000000..7fe5e0f --- /dev/null +++ b/docs/src/app/teste/[userId]/page.tsx @@ -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 ( +
+

{userId}

+
+ ); +}