I have a routes.ts file. And I’m declaring my routes object as below –
type PublicRoute = {
path: string,
element: JSX.Element
}
const publicRoutes: Array<PublicRoute> = [
{
path: "/signup",
element: <SignUp />
}
]
But getting a compilation error as
Expected ">" but found "/"
10 | {
11 | path: "/signup",
12 | element: <SignUp /
| ^
13 | ]
I want to use it through a .map
function.