import React from 'react';
import { Route, Switch } from 'react-router-dom';
import Console from './components/Console';
import Home from './components/Home';

function App() {
  // Type assertions needed for React 18 compatibility with react-router-dom v5 types
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  const SwitchComponent = Switch as any;
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  const RouteComponent = Route as any;

  return (
    <div className="App">
      <SwitchComponent>
        <RouteComponent path="/console" exact component={Console} />
        <RouteComponent path="/" component={Home} />
      </SwitchComponent>
    </div>
  );
}

export default App;
