import React from 'react';
import {BrowserRouter, Route, Switch} from 'react-router-dom'
import HomePage from './Components/HomePage'
import Scan from './Components/ScanPage';
import ViewItem from './Components/ViewItem'

const App = () => {
  return(
    <BrowserRouter>
      <div className="App">
        <Switch>
          <Route exact path="/" component={HomePage} />
          <Route exact path="/:name" component={ViewItem} />
          <Route path="/:name/:item" component={Scan} />
        </Switch>
      </div>
    </BrowserRouter>
  )
}

export default App;
