redirect routing for prototype (#1030)
Fixes #1019. Test plan: Loading the prototype works, as does clicking through to different prototype pages. “Running `git grep -F '/prototypes/'` returns no results; before this commit, it yielded 2 results.”
This commit is contained in:
parent
642a62437b
commit
21d7f09d65
|
@ -26,7 +26,7 @@ export default function makePrototypesPage(
|
||||||
<ul>
|
<ul>
|
||||||
{registry.map((x) => (
|
{registry.map((x) => (
|
||||||
<li key={stringify(x)}>
|
<li key={stringify(x)}>
|
||||||
<Link to={`/prototypes/${x.repoId.owner}/${x.repoId.name}/`}>
|
<Link to={`/prototype/${x.repoId.owner}/${x.repoId.name}/`}>
|
||||||
{`${x.repoId.owner}/${x.repoId.name}`}
|
{`${x.repoId.owner}/${x.repoId.name}`}
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -48,7 +48,7 @@ function makeRouteData(registry /*: RepoIdRegistry */) /*: RouteData */ {
|
||||||
navTitle: "Prototype",
|
navTitle: "Prototype",
|
||||||
},
|
},
|
||||||
...registry.map((entry) => ({
|
...registry.map((entry) => ({
|
||||||
path: `/prototypes/${entry.repoId.owner}/${entry.repoId.name}/`,
|
path: `/prototype/${entry.repoId.owner}/${entry.repoId.name}/`,
|
||||||
contents: {
|
contents: {
|
||||||
type: "PAGE",
|
type: "PAGE",
|
||||||
component: () => require("./ProjectPage").default(entry.repoId),
|
component: () => require("./ProjectPage").default(entry.repoId),
|
||||||
|
|
Loading…
Reference in New Issue