Skip to content

Commit

Permalink
index page
Browse files Browse the repository at this point in the history
  • Loading branch information
alextaing committed Nov 10, 2023
1 parent 6f337fb commit a94a193
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/pages/src/dev/server/middleware/indexPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,22 @@ const createStaticPageListItems = (
devServerPort: number
) => {
return Array.from(localDataManifest.static).reduce(
(templateAccumulator, [, { featureName, staticPages }]) =>
(templateAccumulator, [, { featureName, slugToLocaleMap }]) =>
templateAccumulator +
`<h4>${featureName} pages (${staticPages.length}):</h4>` +
`<h4>${featureName} pages (${slugToLocaleMap.size}):</h4>` +
`<table>
<thead>
<tr>
<td>URL</td>
${staticPages.length > 1 ? "<td>Locale</td>" : ""}
${slugToLocaleMap.size > 1 ? "<td>Locale</td>" : ""}
</tr>
</thead>
<tbody>
${staticPages
${[...slugToLocaleMap]
.map(
({ staticURL, locale }) => `<tr>
([staticURL, locale]) => `<tr>
${
staticPages.length > 1
slugToLocaleMap.size > 1
? `<td>
<a href="http://localhost:${devServerPort}/${staticURL}?locale=${locale}">
${staticURL}?locale=${locale}
Expand All @@ -219,7 +219,7 @@ const createStaticPageListItems = (
</a>
</td>`
}
${staticPages.length > 1 ? `<td>${locale}</td>` : ""}`
${slugToLocaleMap.size > 1 ? `<td>${locale}</td>` : ""}`
)
.join("")}
</tr>
Expand Down

0 comments on commit a94a193

Please sign in to comment.