<Route path="/exercises" element={<Layout />}>
<Route index element={<List />} />
<Route path=":id" element={<Exercise />} />
</Route>
How would I rewrite this as JS objects for useRoutes() including the index route?
{
path: "/exercises",
element: <Layout />,
children : [
{index? , element: <List />},
{path: ":id", element: <Exercise /> }
]
}
I'm not sure what to do with index...