From c884efb837aa88b40b0200e47d313bbb42fc0ca3 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Mon, 29 Oct 2018 05:39:28 +1100 Subject: [PATCH] Further improved minimization of Language and fixed an overflow-x bug --- public/components/page/route/Routes.jsx | 4 +- public/objects/modal/Modal.jsx | 11 +++-- public/objects/window/AddressBar.jsx | 22 ++++------ .../page => pages}/error/ErrorPage.jsx | 11 ++++- public/pages/home/HomePage.jsx | 13 +----- public/pages/home/sections/BannerSection.jsx | 12 +++--- .../pages/home/sections/PlatformsSection.jsx | 43 ++++++++++--------- .../page => pages}/loading/LoadingPage.jsx | 0 .../page => pages}/loading/LoadingPage.scss | 0 public/styles/common.scss | 2 + public/styles/elements/#app.scss | 27 ++++++++++++ 11 files changed, 84 insertions(+), 61 deletions(-) rename public/{components/page => pages}/error/ErrorPage.jsx (80%) rename public/{components/page => pages}/loading/LoadingPage.jsx (100%) rename public/{components/page => pages}/loading/LoadingPage.scss (100%) create mode 100644 public/styles/elements/#app.scss diff --git a/public/components/page/route/Routes.jsx b/public/components/page/route/Routes.jsx index 16d5d16..b88192d 100644 --- a/public/components/page/route/Routes.jsx +++ b/public/components/page/route/Routes.jsx @@ -28,8 +28,8 @@ import { withRouter } from 'react-router'; import { HashRouter, Route, Switch } from 'react-router-dom'; import { CSSTransition, TransitionGroup } from 'react-transition-group'; -import ErrorPage from './../error/ErrorPage'; -import LoadingPage from './../loading/LoadingPage'; +import ErrorPage from '@pages/error/ErrorPage'; +import LoadingPage from '@pages/loading/LoadingPage'; const PageLoading = (props) => { let { error, pastDelay } = props; diff --git a/public/objects/modal/Modal.jsx b/public/objects/modal/Modal.jsx index 4d5f2ea..e41ea4e 100644 --- a/public/objects/modal/Modal.jsx +++ b/public/objects/modal/Modal.jsx @@ -28,7 +28,7 @@ import { CSSTransition, TransitionGroup } from 'react-transition-group'; import Styles from './Modal.scss'; -import Language from '@public/language/Language'; +import { withLanguage } from '@public/language/Language'; import { openModal, closeModal } from '@public/actions/ModalActions'; import Keyboard from '@public/keyboard/Keyboard'; @@ -55,14 +55,14 @@ class Modal extends React.Component { render() { let newProps = {...this.props}; - let { buttons, closeModal, close, title, children, large, modal } = newProps; + let { buttons, closeModal, close, title, children, large, modal, lang } = newProps; ["onExited"].forEach(e => delete newProps[e]); //Add necessary buttons buttons = buttons || []; if(!Array.isArray(buttons)) buttons = [ buttons ]; - if(close) buttons = [...buttons,