From 9f6ee2d95c21b58a3e8b3d57120b8994efefa46f Mon Sep 17 00:00:00 2001 From: developomp Date: Wed, 29 Sep 2021 22:23:27 +0900 Subject: [PATCH] renamed Spinner.tsx to Loading.tsx, changed loading screen design, chagned emphasis on IE not supported message, and added loading page --- source/src/App.tsx | 120 ++++++++++++------------- source/src/components/Loading.tsx | 144 ++++++++++++++++++++++++++++++ source/src/components/Spinner.tsx | 116 ------------------------ source/src/pages/Page.tsx | 4 +- 4 files changed, 205 insertions(+), 179 deletions(-) create mode 100644 source/src/components/Loading.tsx delete mode 100644 source/src/components/Spinner.tsx diff --git a/source/src/App.tsx b/source/src/App.tsx index 9bb662e..534ceee 100644 --- a/source/src/App.tsx +++ b/source/src/App.tsx @@ -14,7 +14,7 @@ import "katex/dist/katex.min.css" // latex mathematical expression import theming from "./theming" -import Spinner from "./components/Spinner" +import Loading from "./components/Loading" import Navbar from "./components/Navbar" import Footer from "./components/Footer" @@ -245,10 +245,9 @@ const IENotSupported = styled.p` ` const StyledContentContainer = styled.div` - display: inline-block; flex: 1 1 auto; margin-bottom: 3rem; - margin-top: 3rem; + margin-top: 5rem; ` interface AppProps {} @@ -299,71 +298,70 @@ export default class App extends React.Component { render() { if (isIE) return ( - <> - - Internet Explorer is not supported. - - + + Internet Explorer is not supported. + ) - else - return ( - - - this.setState({ currentTheme: setThemeTo }), // make setTheme function available in other components - }} - > - - - + return ( + + + this.setState({ currentTheme: setThemeTo }), // make setTheme function available in other components + }} + > + + - + - - + - - - - {this.state.isLoading ? ( - - ) : ( - - - - + + - - - + + + + {this.state.isLoading ? ( + + ) : ( + + + + - - - + + + - - {({ match }) => ( - - )} - - - )} - -