import { Route , Routes } from 'react-router' ; import { ErrorBoundary } from './utils/ErrorBoundary' ; import { Hero } from './Hero' ; import { HeroesPagination } from './HeroesPagination' ; import { PageNotFound } from './PageNotFound' ; export function Router ( ) { return ( < ErrorBoundary > < Routes > { } < Route path = "/" element = { < HeroesPagination / > } /> < Route path = "/:page" element = { < HeroesPagination / > } /> < Route path = "/heroes/:id" element = { < Hero / > } /> < Route element = { < PageNotFound / > } /> < /Routes> < /ErrorBoundary>); }