import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import { HomePage } from './pages/Home.page';
import { Consulta_API } from './pages/Consulta_api';
import { Error_404 } from './pages/404'; // Ajusta si está en otra carpeta
import { Grid_Dashboard } from './pages/Grid_dashboard'; // Ajusta si está en otra carpeta

const router = createBrowserRouter([
  {
    path: '/',
    element: <HomePage />,
  },
  {
    path: '/Consulta_API',
    element: <Consulta_API />,
  },
  {
    path: '/Grid_Dashboard',
    element: <Grid_Dashboard />,
  },


  
  {
    path: '*',
    element: <Error_404 />,
  },
]);

export function Router() {
  return <RouterProvider router={router} />;
}
