Remove replaceableComponentTs from BridgeTile

This commit is contained in:
Will Hunt 2021-01-08 18:07:48 +00:00
parent 000a69765c
commit 448a5ea42d
2 changed files with 0 additions and 11 deletions

View file

@ -22,7 +22,6 @@ import {MatrixClientPeg} from "../../../MatrixClientPeg";
import Pill from "../elements/Pill"; import Pill from "../elements/Pill";
import {makeUserPermalink} from "../../../utils/permalinks/Permalinks"; import {makeUserPermalink} from "../../../utils/permalinks/Permalinks";
import BaseAvatar from "../avatars/BaseAvatar"; import BaseAvatar from "../avatars/BaseAvatar";
import {replaceableComponentTs} from "../../../utils/replaceableComponent";
import SettingsStore from "../../../settings/SettingsStore"; import SettingsStore from "../../../settings/SettingsStore";
import {MatrixEvent} from "matrix-js-sdk/src/models/event"; import {MatrixEvent} from "matrix-js-sdk/src/models/event";
import { Room } from "matrix-js-sdk/src/models/room"; import { Room } from "matrix-js-sdk/src/models/room";
@ -65,7 +64,6 @@ interface IBridgeStateEvent {
}; };
} }
@replaceableComponentTs("views.settings.BridgeTile")
export default class BridgeTile extends React.PureComponent<IProps> { export default class BridgeTile extends React.PureComponent<IProps> {
static propTypes = { static propTypes = {
ev: PropTypes.object.isRequired, ev: PropTypes.object.isRequired,

View file

@ -38,12 +38,3 @@ export function replaceableComponent(name: string, origComponent: React.Componen
// return a falsey value like `null` when the skin doesn't have a component. // return a falsey value like `null` when the skin doesn't have a component.
return () => sdk.getComponent(name) || origComponent; return () => sdk.getComponent(name) || origComponent;
} }
/**
* Typescript-compatible version of `replaceableComponent`
* @see replaceableComponent
* @param {string} name The dot-path name of the component being replaced.
*/
export function replaceableComponentTs(name: string) {
return (origComponent: typeof React.Component) => sdk.getComponent(name) || origComponent;
}