Rename callback on E2eSetup component (#31274)
* Rename callback on E2eSetup component `BaseDialog.onFinished` is unused when `hasCancel=false`, so this callback is only used when the user clicks cancel. For clarity, rename it. * Test for cancellation behaviour
This commit is contained in:
@@ -13,15 +13,19 @@ import CompleteSecurityBody from "../../views/auth/CompleteSecurityBody";
|
||||
import { InitialCryptoSetupDialog } from "../../views/dialogs/security/InitialCryptoSetupDialog";
|
||||
|
||||
interface IProps {
|
||||
onFinished: () => void;
|
||||
/** Callback which is called if the crypto setup failed, and the user clicked the 'cancel' button */
|
||||
onCancelled: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* An {@link AuthPage} which shows the {@link InitialCryptoSetupDialog}.
|
||||
*/
|
||||
export default class E2eSetup extends React.Component<IProps> {
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<AuthPage>
|
||||
<CompleteSecurityBody>
|
||||
<InitialCryptoSetupDialog onFinished={this.props.onFinished} />
|
||||
<InitialCryptoSetupDialog onCancelled={this.props.onCancelled} />
|
||||
</CompleteSecurityBody>
|
||||
</AuthPage>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user