import { BrowserRouter, Route, Routes } from 'react-router-dom'; import Inicio from './paginas/inicio'; import Sobre from './paginas/sobreMim'; import Menu from './componentes/menu'; import Rodape from 'componentes/Rodape'; import PaginaPadrao from 'componentes/PaginaPadrao'; function Rotas() {
return(
<BrowserRouter>
<Menu/>
<Routes>
<Route path="/" element={<PaginaPadrao/>}>
<Route index element={<Inicio />}/>
<Route path="sobremim" element={<Sobre/>}/>
</Route>
<Route path="*" element={<div>Pagina não encontrada</div>} />
</Routes>
<Rodape/>
</BrowserRouter>
)
}
export default Rotas;
import { NavLink } from "react-router-dom"
import styles from "./menulink.module.css"
const MenuLink=({children, to})=>{
return (
<NavLink className={({isActive})=>
`${styles.link}
${isActive ? styles.link_destacado : ""}
`}
to={to}
end
>
{children}
</NavLink>
)
}
export default MenuLink