import React from 'react';
import { RouterProvider, createBrowserRouter } from "react-router-dom";
import HomePage from "./pages/homepage";
import DetailsPage from "./pages/detailspage";
import NoPage from "./pages/nopage";

const Myrouter = createBrowserRouter([
    {
        path: "/",
        element: <HomePage />,
    },
    {
        path: "/details/:id",
        element: <DetailsPage />,
    },
    {
        path: "*",
        element: <NoPage />,
    },
]);

export default function App() {
    return (
        <div className="App">
            <RouterProvider router={Myrouter}></RouterProvider>
        </div>
    );
}