Browse Source

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>
pull/13329/head
Michael Telatynski 2 years ago
parent
commit
51dc4bbbe4
  1. 4
      src/async-components/structures/CompatibilityView.tsx
  2. 0
      src/async-components/structures/ErrorView.tsx
  3. 10
      src/vector/init.tsx

4
src/components/structures/CompatibilityPage.tsx → src/async-components/structures/CompatibilityView.tsx

@ -25,7 +25,7 @@ interface IProps {
onAccept: () => void;
}
const CompatibilityPage: React.FC<IProps> = ({ onAccept }) => {
const CompatibilityView: React.FC<IProps> = ({ onAccept }) => {
return <div className="mx_ErrorView">
<div className="mx_ErrorView_container">
<div className="mx_HomePage_header">
@ -404,5 +404,5 @@ const CompatibilityPage: React.FC<IProps> = ({ onAccept }) => {
</div>;
};
export default CompatibilityPage;
export default CompatibilityView;

0
src/components/structures/ErrorView.tsx → src/async-components/structures/ErrorView.tsx

10
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(<ErrorView title={title} messages={messages} />,
document.getElementById('matrixchat'));
}
export async function showIncompatibleBrowser(onAccept) {
const CompatibilityPage = (await import(
/* webpackChunkName: "compatibility-page" */
"../components/structures/CompatibilityPage")).default;
window.matrixChat = ReactDOM.render(<CompatibilityPage onAccept={onAccept} />,
const CompatibilityView = (await import(
/* webpackChunkName: "compatibility-view" */
"../async-components/structures/CompatibilityView")).default;
window.matrixChat = ReactDOM.render(<CompatibilityView onAccept={onAccept} />,
document.getElementById('matrixchat'));
}

Loading…
Cancel
Save