mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-09 18:26:40 +00:00
23 lines
487 B
TypeScript
23 lines
487 B
TypeScript
import React from "react";
|
|
import { Router } from "react-router-dom";
|
|
import * as createHistory from "history";
|
|
import Layout from "./pages/Layout";
|
|
import { useAuth0 } from "./authentication/auth0";
|
|
|
|
export const history = createHistory.createBrowserHistory();
|
|
|
|
export default function App() {
|
|
const { loading } = useAuth0();
|
|
|
|
if (loading) {
|
|
return <div>Loading...</div>;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<Router history={history}>
|
|
<Layout />
|
|
</Router>
|
|
</>
|
|
);
|
|
}
|