From 448a5ea42d28bdb1cd8020b98b639cdb7282012a Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Fri, 8 Jan 2021 18:07:48 +0000 Subject: [PATCH] Remove replaceableComponentTs from BridgeTile --- src/components/views/settings/BridgeTile.tsx | 2 -- src/utils/replaceableComponent.ts | 9 --------- 2 files changed, 11 deletions(-) diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index 1f5448dcc1..58499ebd25 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -22,7 +22,6 @@ import {MatrixClientPeg} from "../../../MatrixClientPeg"; import Pill from "../elements/Pill"; import {makeUserPermalink} from "../../../utils/permalinks/Permalinks"; import BaseAvatar from "../avatars/BaseAvatar"; -import {replaceableComponentTs} from "../../../utils/replaceableComponent"; import SettingsStore from "../../../settings/SettingsStore"; import {MatrixEvent} from "matrix-js-sdk/src/models/event"; 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 { static propTypes = { ev: PropTypes.object.isRequired, diff --git a/src/utils/replaceableComponent.ts b/src/utils/replaceableComponent.ts index 7ea192f76b..8c29fdf037 100644 --- a/src/utils/replaceableComponent.ts +++ b/src/utils/replaceableComponent.ts @@ -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 () => 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; -}