import React from 'react';
import './App.css';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import PatientForm from './Components/PatientForm/PatientForm';
import PatientDetails from './Components/PatientDetails/PatientDetails';

function App() {
  const queryClient = new QueryClient();
  return (
    <QueryClientProvider client={queryClient}>
        <div className='flex'>
          <BrowserRouter>
          <Routes>
            <Route path='/' element={<PatientForm type={"fill"}/>} />
            <Route path='/view-details' element={<PatientForm type={"display"}/>}/>
          </Routes>
          </BrowserRouter>
        </div>
    </QueryClientProvider>
  );
}

export default App;
