Step 1: Remove all usage of @replaceableComponent
This commit is contained in:
@@ -23,7 +23,6 @@ import classNames from 'classnames';
|
||||
|
||||
import Analytics from '../../../Analytics';
|
||||
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
|
||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import { ButtonEvent } from "../elements/AccessibleButton";
|
||||
|
||||
interface IProps {
|
||||
@@ -41,7 +40,6 @@ interface IProps {
|
||||
}
|
||||
|
||||
// TODO: replace this, the composer buttons and the right panel buttons with a unified representation
|
||||
@replaceableComponent("views.right_panel.HeaderButton")
|
||||
export default class HeaderButton extends React.Component<IProps> {
|
||||
private onClick = (ev: ButtonEvent) => {
|
||||
Analytics.trackEvent(...this.props.analytics);
|
||||
|
||||
@@ -24,7 +24,6 @@ import dis from '../../../dispatcher/dispatcher';
|
||||
import RightPanelStore from "../../../stores/right-panel/RightPanelStore";
|
||||
import { RightPanelPhases } from '../../../stores/right-panel/RightPanelStorePhases';
|
||||
import { IRightPanelCardState } from '../../../stores/right-panel/RightPanelStoreIPanelState';
|
||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import { UPDATE_EVENT } from '../../../stores/AsyncStore';
|
||||
import { NotificationColor } from '../../../stores/notifications/NotificationColor';
|
||||
|
||||
@@ -40,7 +39,6 @@ interface IState {
|
||||
|
||||
interface IProps {}
|
||||
|
||||
@replaceableComponent("views.right_panel.HeaderButtons")
|
||||
export default abstract class HeaderButtons<P = {}> extends React.Component<IProps & P, IState> {
|
||||
private unmounted = false;
|
||||
private dispatcherRef: string;
|
||||
|
||||
@@ -29,7 +29,6 @@ import { RightPanelPhases } from '../../../stores/right-panel/RightPanelStorePha
|
||||
import { Action } from "../../../dispatcher/actions";
|
||||
import { ActionPayload } from "../../../dispatcher/payloads";
|
||||
import RightPanelStore from "../../../stores/right-panel/RightPanelStore";
|
||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import { useSettingValue } from "../../../hooks/useSettings";
|
||||
import { useReadPinnedEvents, usePinnedEvents } from './PinnedMessagesCard';
|
||||
import { showThreadPanel } from "../../../dispatcher/dispatch-actions/threads";
|
||||
@@ -125,7 +124,6 @@ interface IProps {
|
||||
excludedRightPanelPhaseButtons?: Array<RightPanelPhases>;
|
||||
}
|
||||
|
||||
@replaceableComponent("views.right_panel.RoomHeaderButtons")
|
||||
export default class RoomHeaderButtons extends HeaderButtons<IProps> {
|
||||
private static readonly THREAD_PHASES = [
|
||||
RightPanelPhases.ThreadPanel,
|
||||
|
||||
@@ -33,7 +33,6 @@ import EditorStateTransfer from '../../../utils/EditorStateTransfer';
|
||||
import RoomContext, { TimelineRenderingType } from '../../../contexts/RoomContext';
|
||||
import dis from '../../../dispatcher/dispatcher';
|
||||
import { _t } from '../../../languageHandler';
|
||||
import { replaceableComponent } from '../../../utils/replaceableComponent';
|
||||
import { ActionPayload } from '../../../dispatcher/payloads';
|
||||
import { Action } from '../../../dispatcher/actions';
|
||||
import RoomViewStore from '../../../stores/RoomViewStore';
|
||||
@@ -71,7 +70,6 @@ interface IState {
|
||||
showReadReceipts?: boolean;
|
||||
}
|
||||
|
||||
@replaceableComponent("structures.TimelineCard")
|
||||
export default class TimelineCard extends React.Component<IProps, IState> {
|
||||
static contextType = RoomContext;
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ import { _t } from "../../../languageHandler";
|
||||
import SdkConfig from "../../../SdkConfig";
|
||||
import E2EIcon, { E2EState } from "../rooms/E2EIcon";
|
||||
import Spinner from "../elements/Spinner";
|
||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import AccessibleButton from "../elements/AccessibleButton";
|
||||
import VerificationShowSas from "../verification/VerificationShowSas";
|
||||
|
||||
@@ -54,7 +53,6 @@ interface IState {
|
||||
reciprocateQREvent?: ReciprocateQRCode["reciprocateQREvent"];
|
||||
}
|
||||
|
||||
@replaceableComponent("views.right_panel.VerificationPanel")
|
||||
export default class VerificationPanel extends React.PureComponent<IProps, IState> {
|
||||
private hasVerifier: boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user