From 6acf6a63cc5d6cfb9495fcc400fe23eb06c4d48d Mon Sep 17 00:00:00 2001 From: Fiza Date: Mon, 7 Jun 2021 22:42:32 +0500 Subject: [PATCH] lazy and suspense npm loader removed --- package.json | 1 - src/App.js | 6 +++--- src/Components/Path.js | 41 ++++++++++++----------------------------- src/routes.js | 12 +++++------- 4 files changed, 20 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index bc99c09c..d7208a39 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "version": "1.0.42", "private": true, "dependencies": { - "@lazy-react/react-suspense": "^1.0.8", "@material-ui/core": "^4.11.3", "@material-ui/icons": "^4.11.2", "@material-ui/lab": "^4.0.0-alpha.58", diff --git a/src/App.js b/src/App.js index e7fff743..4e5ce1c6 100644 --- a/src/App.js +++ b/src/App.js @@ -1,4 +1,4 @@ -import React, { Suspense } from "react"; +import React from "react"; import { connect } from "react-redux"; import Paper from "@material-ui/core/Paper"; import {useStyles} from "./globalStyles" @@ -28,9 +28,9 @@ const App = (props) => { return ( - }> + - + );} diff --git a/src/Components/Path.js b/src/Components/Path.js index 194609ff..70b1603a 100644 --- a/src/Components/Path.js +++ b/src/Components/Path.js @@ -1,32 +1,15 @@ -// import AboutUs from "./../Pages/AboutUs/AboutUs"; -// import Services from "./../Pages/Services"; -// import WebServices from "../Pages/WebServices"; -// import Home from "../Pages/Home/index"; -// // import Event from "../Pages/Event/Index"; -// import Testimonials from "../Pages/Testimonials"; -// import Career from "../Pages/Careers/Container"; -// import AppSolutions from "../Pages/AppSolutionsPage/Container"; -// import OurBlogs from "../Pages/OurBlogs"; -// import Quote from "../Pages/ContactUs/index"; -// import HireDeveloper from "../Pages/HireDeveloper"; -// import DigitalMarketing from "../Pages/DigitalMarketing"; -// import CaseStudies from "../Pages/CaseStudies"; -import { lazy } from 'react' - - - -const AboutUs = lazy(() =>import("./../Pages/AboutUs/AboutUs")); -const Services = lazy(() =>import("./../Pages/Services")); -const WebServices = lazy(() =>import("../Pages/WebServices")); -const Home = lazy(() =>import("../Pages/Home/index")); -const Testimonials = lazy(() =>import("../Pages/Testimonials")); -const Career = lazy(() =>import("../Pages/Careers/Container")); -const AppSolutions = lazy(() =>import("../Pages/AppSolutionsPage/Container")); -const OurBlogs = lazy(() =>import("../Pages/OurBlogs")); -const Quote = lazy(() =>import("../Pages/ContactUs/index")); -const HireDeveloper = lazy(() =>import("../Pages/HireDeveloper")); -const DigitalMarketing = lazy(() =>import("../Pages/DigitalMarketing")); -const CaseStudies = lazy(() =>import("../Pages/CaseStudies")); +import AboutUs from "./../Pages/AboutUs/AboutUs"; +import Services from "./../Pages/Services"; +import WebServices from "../Pages/WebServices"; +import Home from "../Pages/Home/index"; +import Testimonials from "../Pages/Testimonials"; +import Career from "../Pages/Careers/Container"; +import AppSolutions from "../Pages/AppSolutionsPage/Container"; +import OurBlogs from "../Pages/OurBlogs"; +import Quote from "../Pages/ContactUs/index"; +import HireDeveloper from "../Pages/HireDeveloper"; +import DigitalMarketing from "../Pages/DigitalMarketing"; +import CaseStudies from "../Pages/CaseStudies"; const pathIds = { home: "home", diff --git a/src/routes.js b/src/routes.js index c75ef53d..be681480 100644 --- a/src/routes.js +++ b/src/routes.js @@ -1,20 +1,19 @@ -import React, { lazy, Suspense } from "react"; +import React, { lazy } from "react"; // import { useSelector } from "react-redux"; import { BrowserRouter as Router, Switch } from "react-router-dom"; import Layout from "./Layout"; import RequireAuth from "./container/RequireAuth"; import { pageRoutes } from "./Components/Path"; import { Loader } from "./Components/loader"; -import { Colors } from "./Theme/color.constants"; -const Home = lazy(() => import("./Pages/Home")); -const Error = lazy(() => import("./Pages/Error/Index")); + import Home from "./Pages/Home"; + import Error from "./Pages/Error/Index"; const Routes = () => { const routeArray = Object.values(pageRoutes); // const isLoggedIn = useSelector((state) => state.userReducer.isLoggedin); - const { Harlequin } = Colors; + return ( - }> + @@ -35,7 +34,6 @@ const Routes = () => { - ); }; export default Routes;