import { createBrowserRouter, RouterProvider, Navigate } from 'react-router';
import List from './List';
import Form from './Form';

const router = createBrowserRouter([
  {
    path: '/list',
    element: <List />,
  },
  {
    path: '/form',
    element: <Form />,
  },
  {
    path: '/',
    element: <Navigate to="/list" replace />,
  },
]);

const App: React.FC = () => {
  return <RouterProvider router={router} />;
};

export default App;

