From 5542e211dfb21121a18d0827715789fc6734d73a Mon Sep 17 00:00:00 2001 From: AlexeySafronov Date: Mon, 17 Aug 2020 13:16:04 +0300 Subject: [PATCH] Web Client: refactoring --- web/ASC.Web.Client/src/App.js | 50 ++++++++++++++----- .../src/components/pages/About/index.js | 1 - .../src/components/pages/Confirm/index.js | 1 - 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/web/ASC.Web.Client/src/App.js b/web/ASC.Web.Client/src/App.js index 7fff35b2d3..71b93c3d7e 100644 --- a/web/ASC.Web.Client/src/App.js +++ b/web/ASC.Web.Client/src/App.js @@ -1,37 +1,63 @@ import React, { Suspense, lazy } from "react"; import { Router, Route, Switch } from "react-router-dom"; import { Loader } from "asc-web-components"; -import { history, PrivateRoute, PublicRoute, Login, Error404, StudioLayout, Offline, ComingSoon} from "asc-web-common"; -import About from "./components/pages/About"; +import { + history, + PrivateRoute, + PublicRoute, + Login, + Error404, + StudioLayout, + Offline, + ComingSoon +} from "asc-web-common"; -const Home = lazy(() => import("./components/pages/Home")); +import Home from "./components/pages/Home"; + +const About = lazy(() => import("./components/pages/About")); const Confirm = lazy(() => import("./components/pages/Confirm")); const Settings = lazy(() => import("./components/pages/Settings")); const Wizard = lazy(() => import("./components/pages/Wizard")); const App = () => { - return ( - navigator.onLine ? + return navigator.onLine ? ( } + fallback={} > - + - + - + - : - + + ) : ( + ); }; -export default App; \ No newline at end of file +export default App; diff --git a/web/ASC.Web.Client/src/components/pages/About/index.js b/web/ASC.Web.Client/src/components/pages/About/index.js index 8e8807f113..87fa593840 100644 --- a/web/ASC.Web.Client/src/components/pages/About/index.js +++ b/web/ASC.Web.Client/src/components/pages/About/index.js @@ -7,7 +7,6 @@ import styled from "styled-components"; import { Trans } from "react-i18next"; import { createI18N } from "../../../helpers/i18n"; -//const path = require("path"); const i18n = createI18N({ page: "About", localesPath: "pages/About" diff --git a/web/ASC.Web.Client/src/components/pages/Confirm/index.js b/web/ASC.Web.Client/src/components/pages/Confirm/index.js index c32f2663f1..87e17b3059 100644 --- a/web/ASC.Web.Client/src/components/pages/Confirm/index.js +++ b/web/ASC.Web.Client/src/components/pages/Confirm/index.js @@ -6,7 +6,6 @@ import { I18nextProvider } from "react-i18next"; import { Error404, utils } from "asc-web-common"; import { createI18N } from "../../../helpers/i18n"; -//const path = require("path"); const i18n = createI18N({ page: "Confirm", localesPath: "pages/Confirm"