Step 3.2: Stop using getComponent
in code
This commit is contained in:
parent
d977865b8e
commit
b667ef9f18
18 changed files with 54 additions and 93 deletions
|
@ -30,10 +30,10 @@ import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
|||
import { ensureDMExists } from "../../../createRoom";
|
||||
import { useTypedEventEmitter } from "../../../hooks/useEventEmitter";
|
||||
import Modal from "../../../Modal";
|
||||
import * as sdk from "../../../index";
|
||||
import { _t } from "../../../languageHandler";
|
||||
import { RightPanelPhases } from '../../../stores/right-panel/RightPanelStorePhases';
|
||||
import RightPanelStore from "../../../stores/right-panel/RightPanelStore";
|
||||
import ErrorDialog from "../dialogs/ErrorDialog";
|
||||
|
||||
// cancellation codes which constitute a key mismatch
|
||||
const MISMATCHES = ["m.key_mismatch", "m.user_error", "m.mismatched_sas"];
|
||||
|
@ -84,8 +84,6 @@ const EncryptionPanel: React.FC<IProps> = (props: IProps) => {
|
|||
const changeHandler = useCallback(() => {
|
||||
// handle transitions -> cancelled for mismatches which fire a modal instead of showing a card
|
||||
if (request && request.cancelled && MISMATCHES.includes(request.cancellationCode)) {
|
||||
// FIXME: Using an import will result in test failures
|
||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||
Modal.createTrackedDialog("Verification failed", "insecure", ErrorDialog, {
|
||||
headerImage: require("../../../../res/img/e2e/warning.svg").default,
|
||||
title: _t("Your messages are not secure"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue