|
@@ -6,33 +6,28 @@ import * as routes from './constants/routes'
|
|
|
import Header from "./containers/Header"
|
|
|
import landingPage from './components/landingPage'
|
|
|
import Footer from './components/footer'
|
|
|
-import Loader from 'react-loader-spinner'
|
|
|
|
|
|
-const notFound = lazy(() => import("./components/notFound"));
|
|
|
-const homePage = lazy(() => import("./components/homePage"));
|
|
|
+import spinner from "./components/common/spinner";
|
|
|
+
|
|
|
+const notFound = lazy(() => import("./components/notFound"));
|
|
|
+const homePage = lazy(() => import("./components/homePage"));
|
|
|
const signInPage = lazy(() => import("./components/auth/signInPage"));
|
|
|
const signUpPage = lazy(() => import("./components/auth/signUpPage"));
|
|
|
|
|
|
|
|
|
export default () => (
|
|
|
- <Suspense fallback={
|
|
|
- <Loader
|
|
|
- type="Puff"
|
|
|
- color="#00BFFF"
|
|
|
- height="100"
|
|
|
- width="100"
|
|
|
- />
|
|
|
- }>
|
|
|
- <div className="container">
|
|
|
- <Header />
|
|
|
+ <div className="app">
|
|
|
+ <Header />
|
|
|
+ <Suspense fallback={<spinner />}>
|
|
|
<Switch>
|
|
|
<Route path={routes.LANDING} exact component={landingPage} />
|
|
|
<Route path={routes.SIGN_IN} exact component={signInPage} />
|
|
|
<Route path={routes.SIGN_UP} exact component={signUpPage} />
|
|
|
<Route path={routes.HOME} exact component={homePage} />
|
|
|
+ {/* Test spinner component <Route path="/spinner" exact component={spinner} /> */}
|
|
|
<Route component={notFound} />
|
|
|
</Switch>
|
|
|
- <Footer />
|
|
|
- </div>
|
|
|
- </Suspense>
|
|
|
+ </Suspense>
|
|
|
+ <Footer />
|
|
|
+ </div>
|
|
|
);
|