From 51dc4bbbe45e7189024c757106dc473e9ba0a1db Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 23 Apr 2020 16:45:24 +0100 Subject: [PATCH] Move async components to async-components to move them out of the skin bundle and s/CompatibilityPage/CompatibilityView/ Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../structures/CompatibilityView.tsx} | 4 ++-- .../structures/ErrorView.tsx | 0 src/vector/init.tsx | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) rename src/{components/structures/CompatibilityPage.tsx => async-components/structures/CompatibilityView.tsx} (99%) rename src/{components => async-components}/structures/ErrorView.tsx (100%) diff --git a/src/components/structures/CompatibilityPage.tsx b/src/async-components/structures/CompatibilityView.tsx similarity index 99% rename from src/components/structures/CompatibilityPage.tsx rename to src/async-components/structures/CompatibilityView.tsx index ef587fb259..98852dd239 100644 --- a/src/components/structures/CompatibilityPage.tsx +++ b/src/async-components/structures/CompatibilityView.tsx @@ -25,7 +25,7 @@ interface IProps { onAccept: () => void; } -const CompatibilityPage: React.FC = ({ onAccept }) => { +const CompatibilityView: React.FC = ({ onAccept }) => { return
@@ -404,5 +404,5 @@ const CompatibilityPage: React.FC = ({ onAccept }) => {
; }; -export default CompatibilityPage; +export default CompatibilityView; diff --git a/src/components/structures/ErrorView.tsx b/src/async-components/structures/ErrorView.tsx similarity index 100% rename from src/components/structures/ErrorView.tsx rename to src/async-components/structures/ErrorView.tsx diff --git a/src/vector/init.tsx b/src/vector/init.tsx index ce9c7a2339..82c5931bde 100644 --- a/src/vector/init.tsx +++ b/src/vector/init.tsx @@ -148,16 +148,16 @@ export async function loadApp(fragParams: {}) { export async function showError(title: string, messages?: string[]) { const ErrorView = (await import( /* webpackChunkName: "error-view" */ - "../components/structures/ErrorView")).default; + "../async-components/structures/ErrorView")).default; window.matrixChat = ReactDOM.render(, document.getElementById('matrixchat')); } export async function showIncompatibleBrowser(onAccept) { - const CompatibilityPage = (await import( - /* webpackChunkName: "compatibility-page" */ - "../components/structures/CompatibilityPage")).default; - window.matrixChat = ReactDOM.render(, + const CompatibilityView = (await import( + /* webpackChunkName: "compatibility-view" */ + "../async-components/structures/CompatibilityView")).default; + window.matrixChat = ReactDOM.render(, document.getElementById('matrixchat')); }