diff --git a/src/components/views/right_panel/HeaderButton.tsx b/src/components/views/right_panel/HeaderButton.tsx index 563af90432..022a993c65 100644 --- a/src/components/views/right_panel/HeaderButton.tsx +++ b/src/components/views/right_panel/HeaderButton.tsx @@ -29,7 +29,7 @@ interface IProps { // click handler onClick: () => void; // The badge to display above the icon - badge: React.ReactNode; + badge?: React.ReactNode; // The parameters to track the click event analytics: string[]; diff --git a/src/components/views/right_panel/HeaderButtons.tsx b/src/components/views/right_panel/HeaderButtons.tsx index 9e57eab5eb..8141e8a9cc 100644 --- a/src/components/views/right_panel/HeaderButtons.tsx +++ b/src/components/views/right_panel/HeaderButtons.tsx @@ -23,7 +23,7 @@ import dis from '../../../dispatcher/dispatcher'; import RightPanelStore from "../../../stores/RightPanelStore"; import {RightPanelPhases} from "../../../stores/RightPanelStorePhases"; import {Action} from '../../../dispatcher/actions'; -import {SetRightPanelPhasePayload} from '../../../dispatcher/payloads/SetRightPanelPhasePayload'; +import {SetRightPanelPhasePayload, SetRightPanelPhaseRefireParams} from '../../../dispatcher/payloads/SetRightPanelPhasePayload'; export enum HeaderKind { Room = "room", @@ -65,7 +65,7 @@ export default class HeaderButtons extends React.Component { // Ignore - intended to be overridden by subclasses } - setPhase(phase: RightPanelPhases, extras) { + setPhase(phase: RightPanelPhases, extras?: Partial) { dis.dispatch({ action: Action.SetRightPanelPhase, phase: phase, diff --git a/src/components/views/right_panel/RoomHeaderButtons.js b/src/components/views/right_panel/RoomHeaderButtons.tsx similarity index 100% rename from src/components/views/right_panel/RoomHeaderButtons.js rename to src/components/views/right_panel/RoomHeaderButtons.tsx diff --git a/src/dispatcher/payloads/SetRightPanelPhasePayload.ts b/src/dispatcher/payloads/SetRightPanelPhasePayload.ts index 8d8eca762c..94e38b7ce6 100644 --- a/src/dispatcher/payloads/SetRightPanelPhasePayload.ts +++ b/src/dispatcher/payloads/SetRightPanelPhasePayload.ts @@ -29,8 +29,10 @@ export interface SetRightPanelPhasePayload extends ActionPayload { export interface SetRightPanelPhaseRefireParams { // XXX: Fix after the types are defiend in matrix-js-sdk // No appropriate types exist yet for the fields - members: any; - verificationRequest: typeof VerificationRequest; - groudId: string; - groupRoomId: string; + members?: any; + verificationRequest?: typeof VerificationRequest; + groudId?: string; + groupRoomId?: string; + // XXX: 'view_3pid_invite' action's payload + event?: any; }