Remove sdk.getComponent() where possible (#7091)

This commit is contained in:
Šimon Brandner 2021-11-08 11:27:52 +01:00 committed by GitHub
parent 6d3ba0eb95
commit f08c0b3592
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 27 additions and 44 deletions

View file

@ -21,7 +21,6 @@ import { Resizable } from "re-resizable";
import AppTile from '../elements/AppTile';
import dis from '../../../dispatcher/dispatcher';
import * as sdk from '../../../index';
import * as ScalarMessaging from '../../../ScalarMessaging';
import WidgetUtils from '../../../utils/WidgetUtils';
import WidgetEchoStore from "../../../stores/WidgetEchoStore";
@ -37,6 +36,7 @@ import UIStore from "../../../stores/UIStore";
import { Room } from "matrix-js-sdk/src/models/room";
import { IApp } from "../../../stores/WidgetStore";
import { ActionPayload } from "../../../dispatcher/payloads";
import Spinner from "../elements/Spinner";
interface IProps {
userId: string;
@ -237,8 +237,7 @@ export default class AppsDrawer extends React.Component<IProps, IState> {
WidgetUtils.getRoomWidgets(this.props.room),
)
) {
const Loader = sdk.getComponent("elements.Spinner");
spinner = <Loader />;
spinner = <Spinner />;
}
const classes = classNames({