import { Route, Routes } from "react-router-dom";
import "./App.css";
import { AuthApi } from "./api/AuthApi";
import { NotFoundRoute } from "./routes/NotFound";
import { BaseLoginPage } from "./widgets/BaseLoginpage";

function App() {
  return (
    <Routes>
      {AuthApi.SignedIn ? (
        <Route path="*" element={<p>signed in</p>} />
      ) : (
        <Route path="*" element={<BaseLoginPage />}>
          <Route path="*" element={<NotFoundRoute />} />
        </Route>
      )}
    </Routes>
  );
}

export default App;
