import './App.css'; import {Routes, Route, useNavigate} from 'react-router-dom'; import Noticias from './Noticias'; import Datos from './Datos'; function App() { const navigate = useNavigate(); const navigateToNoticias = () => { // navigate to /Datos.js navigate('./Noticias.js', {replace: true}); }; const navigateToDatos = () => { // navigate to /Datos.js navigate('./Datos.js', {replace: true}); }; return ( <>