- add @ts-ignore comment for mapped Route components - add @ts-ignore comment for catch-all Route component
@@ -18,8 +18,10 @@ export function TestRouter({
<MemoryRouter initialEntries={[initialPath]}>
<Routes>
{routes.map((route, index) => (
+ // @ts-ignore
<Route key={index} path={route.path} element={route.element} />
))}
+ {/* @ts-ignore */}
<Route path="*" element={children} />
</Routes>
</MemoryRouter>