Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/favicon and loader #2

Merged
merged 2 commits into from
Oct 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
style: add react loader
  • Loading branch information
mohibkay committed Oct 17, 2021
commit 219356cb40217264695c34b308937e6b3db474e3
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Suspense, lazy } from "react";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import "./App.css";
import Loader from "./components/utils/Loader";
import { ROUTES } from "./constants";
import UserContext from "./context/user";
import useAuthListener from "./customHooks/useAuthListener";
import PrivateRoute from "./components/auth/PrivateRoute";
import Profile from "./pages/profile";
import ReactLoader from "react-loader";

const Login = lazy(() => import("./pages/login"));
const Signup = lazy(() => import("./pages/signup"));
Expand All @@ -19,7 +19,7 @@ function App() {
return (
<UserContext.Provider value={{ user }}>
<Router>
<Suspense fallback={<Loader />}>
<Suspense fallback={<ReactLoader />}>
<Switch>
<Route path={ROUTES.LOGIN} component={Login} />
<Route path={ROUTES.SIGN_UP} component={Signup} />
Expand Down