Howdy Folks,
I am stuck on an error when creating dynamic routes.
I have a couple of routes
<Route path="/video/{id:String}" page={VideoPage} name="video" />
<Route path="/video/new/{id:String}" page={NewUserVideoPage} name="newUserVideo" />
When navigating to http://localhost:8910/video/new/1234 I get the following error
Missing parameter ‘id’ for route ‘/video/new/{id:String}’.
I have an idea param there so not sure what’s up
the code on the page is
import { Link, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
type NewVideoPageProps = {
id: string
}
const NewUserVideoPage = ({ id }: NewVideoPageProps) => {
return (
<>
<MetaTags title="NewUserVideo" description="NewUserVideo page" />
<h1>NewUserVideoPage {id}</h1>
<p>
Find me in{' '}
<code>./web/src/pages/NewUserVideoPage/NewUserVideoPage.tsx</code>
</p>
<p>
My default route is named <code>newUserVideo</code>, link to me with `
<Link to={routes.newUserVideo()}>NewUserVideo</Link>`
</p>
</>
)
}
export default NewUserVideoPage
Can anyone tell me where I am going wrong?
I just tired a fresh page which was not using a nested route and I am getting the same issue
Using the latest version of RW
Thanks
Shannon