Skip to content

Commit a21676c

Browse files
committed
This was more readable (sorry Hayder, 100% my bad)
1 parent 88cdeb9 commit a21676c

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

  • website/src/pages/[locale]/supported-networks

website/src/pages/[locale]/supported-networks/[id].mdx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ import { getSupportedNetworks } from '@/supportedNetworks'
88

99
export const getStaticPaths = async () => {
1010
const networks = await getSupportedNetworks()
11-
const paths = supportedLocales.flatMap((locale) =>
12-
networks.map((network) => ({
13-
params: { locale, id: network.id },
14-
}))
15-
)
16-
17-
return { paths, fallback: false } }
11+
const paths = []
12+
for (const locale of supportedLocales) {
13+
for (const network of networks) {
14+
paths.push({
15+
params: { locale, id: network.id },
16+
})
17+
}
18+
}
19+
return { paths, fallback: false }
20+
}
1821

1922
export const getStaticProps = async ({ params }) => {
2023
const { locale, id } = params

0 commit comments

Comments
 (0)