1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-12 07:02:50 +03:00

Remove sdk.getComponent() where possible (#7091)

This commit is contained in:
Šimon Brandner
2021-11-08 11:27:52 +01:00
committed by GitHub
parent 6d3ba0eb95
commit f08c0b3592
15 changed files with 27 additions and 44 deletions

View File

@@ -33,6 +33,7 @@ import { DeviceTrustLevel } from 'matrix-js-sdk/src/crypto/CrossSigning';
import { logger } from "matrix-js-sdk/src/logger";
import { ComponentType } from "react";
import QuestionDialog from "./components/views/dialogs/QuestionDialog";
// This stores the secret storage private keys in memory for the JS SDK. This is
// only meant to act as a cache to avoid prompting the user multiple times
@@ -72,7 +73,6 @@ export class AccessCancelledError extends Error {
}
async function confirmToDismiss(): Promise<boolean> {
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
const [sure] = await Modal.createDialog(QuestionDialog, {
title: _t("Cancel entering passphrase?"),
description: _t("Are you sure you want to cancel entering passphrase?"),