Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import React, { FormEventHandler, forwardRef, useCallback, useState } from 'react';
|
||||
import { Dialog, Header, Box, Text, IconButton, config, Button, Chip, color, Spinner } from 'folds';
|
||||
import { Icon, Icons } from './icons';
|
||||
import FileSaver from 'file-saver';
|
||||
import to from 'await-to-js';
|
||||
import { AuthDict, IAuthData, MatrixError, UIAuthCallback } from 'matrix-js-sdk';
|
||||
import { Icon, Icons } from './icons';
|
||||
import { PasswordInput } from './password-input';
|
||||
import { ContainerColor } from '../styles/ContainerColor.css';
|
||||
import { copyToClipboard } from '../utils/dom';
|
||||
@@ -15,7 +15,7 @@ import { useAlive } from '../hooks/useAlive';
|
||||
import { UseStateProvider } from './UseStateProvider';
|
||||
|
||||
type UIACallback<T> = (
|
||||
authDict: AuthDict | null
|
||||
authDict: AuthDict | null,
|
||||
) => Promise<[IAuthData, undefined] | [undefined, T]>;
|
||||
|
||||
type PerformAction<T> = (authDict: AuthDict | null) => Promise<T>;
|
||||
@@ -30,7 +30,7 @@ function makeUIAAction<T>(
|
||||
authData: IAuthData,
|
||||
performAction: PerformAction<T>,
|
||||
resolve: (data: T) => void,
|
||||
reject: (error?: any) => void
|
||||
reject: (error?: any) => void,
|
||||
): UIAAction<T> {
|
||||
const action: UIAAction<T> = {
|
||||
authData,
|
||||
@@ -79,7 +79,7 @@ function SetupVerification({ onComplete }: SetupVerificationProps) {
|
||||
setNextAuthData(authData);
|
||||
}
|
||||
},
|
||||
[uiaAction, alive]
|
||||
[uiaAction, alive],
|
||||
);
|
||||
|
||||
const resetUIA = useCallback(() => {
|
||||
@@ -106,7 +106,7 @@ function SetupVerification({ onComplete }: SetupVerificationProps) {
|
||||
(err) => {
|
||||
resetUIA();
|
||||
reject(err);
|
||||
}
|
||||
},
|
||||
);
|
||||
if (alive()) {
|
||||
setUIAAction(action);
|
||||
@@ -118,7 +118,7 @@ function SetupVerification({ onComplete }: SetupVerificationProps) {
|
||||
reject(error);
|
||||
});
|
||||
}),
|
||||
[alive, resetUIA]
|
||||
[alive, resetUIA],
|
||||
);
|
||||
|
||||
const [setupState, setup] = useAsyncCallback<void, Error, [string | undefined]>(
|
||||
@@ -147,8 +147,8 @@ function SetupVerification({ onComplete }: SetupVerificationProps) {
|
||||
|
||||
onComplete(recoveryKeyData.encodedPrivateKey);
|
||||
},
|
||||
[mx, onComplete, authUploadDeviceSigningKeys]
|
||||
)
|
||||
[mx, onComplete, authUploadDeviceSigningKeys],
|
||||
),
|
||||
);
|
||||
|
||||
const loading = setupState.status === AsyncStatus.Loading;
|
||||
@@ -302,7 +302,7 @@ export const DeviceVerificationSetup = forwardRef<HTMLDivElement, DeviceVerifica
|
||||
</Box>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
type DeviceVerificationResetProps = {
|
||||
onCancel: () => void;
|
||||
@@ -359,5 +359,5 @@ export const DeviceVerificationReset = forwardRef<HTMLDivElement, DeviceVerifica
|
||||
)}
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user