import { RouterProvider, createBrowserRouter } from "react-router-dom";
import "./App.css";
import Home from "./pages/Home";
import Error from "./components/Error";
import CharacterDetails from "./components/characterDetail/CharacterDetails";
function App() {
  const router = createBrowserRouter([
    {
      errorElement: <Error />,
      children: [
        {
          path: "/",
          element: <Home />,
        },
        {
          path: "/characterDetails/:id",
          element: <CharacterDetails />,
        },
      ],
    },
  ]);

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

export default App;
