import React from 'react';
import {
  createBrowserRouter,
  RouterProvider,
} from "react-router-dom";
import { Home } from "./Home";
import { List } from "./List";
import { Create } from "./Create";

const router = createBrowserRouter([
  {
    path: "/",
    element: <Home/>,
    children: [{
      path: '/',
      element: <List/>
    }, {
      path: '/create/:id',
      element: <Create />
    }, {
      path: '/detail/:id',
      element: <Create edit />
    }]
  },
]);

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

export default App;
