/** @jsx jsx */ /** @global location */ import React, { Suspense } from "react"; import { jsx, css, Global } from "@emotion/react"; import { BrowserRouter, Route, Routes } from "react-router-dom"; import { PropagateLoader } from "react-spinners"; import { CSSTransition, TransitionGroup } from "react-transition-group"; import globalStyles from "./globalStyles"; import NotFound from "./pages/NotFound"; const LandingPage = React.lazy(() => import("./pages/LandingPage")); const FormPage = React.lazy(() => import("./pages/FormPage/FormPage")); const CallbackPage = React.lazy(() => import("./pages/CallbackPage")); const routes = [ { path: "/", Component: LandingPage }, { path: "/form/:id", Component: FormPage}, { path: "/callback", Component: CallbackPage } ]; function PageLoading() { return
; } function Routing(): JSX.Element { const renderedRoutes = routes.map(({path, Component}) => ( }> }/> )); return ( {renderedRoutes} }/> ); } function App(): JSX.Element { return (
}/>
); } export default App;