Make SonarCloud happier (#9545)
* Make SonarCloud happier * i18n * Iterate * Update AddExistingToSpaceDialog.tsx * Update SlashCommands.tsx
This commit is contained in:
parent
77764d80bc
commit
3747464b41
33 changed files with 131 additions and 162 deletions
|
@ -181,7 +181,7 @@ export const AddExistingToSpace: React.FC<IAddExistingToSpaceProps> = ({
|
|||
setError(null);
|
||||
setProgress(0);
|
||||
|
||||
let error;
|
||||
let error: Error | undefined;
|
||||
|
||||
for (const room of selectedToAdd) {
|
||||
const via = calculateRoomVia(room);
|
||||
|
@ -197,13 +197,15 @@ export const AddExistingToSpace: React.FC<IAddExistingToSpaceProps> = ({
|
|||
setProgress(i => i + 1);
|
||||
} catch (e) {
|
||||
logger.error("Failed to add rooms to space", e);
|
||||
setError(error = e);
|
||||
error = e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!error) {
|
||||
onFinished(true);
|
||||
} else {
|
||||
setError(error);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -128,9 +128,6 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
|
|||
this.nameField.current.focus();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
}
|
||||
|
||||
private onKeyDown = (event: KeyboardEvent) => {
|
||||
const action = getKeyBindingsManager().getAccessibilityAction(event);
|
||||
switch (action) {
|
||||
|
|
|
@ -92,12 +92,13 @@ const KeySignatureUploadFailedDialog: React.FC<IProps> = ({
|
|||
/>
|
||||
</div>);
|
||||
} else {
|
||||
let text = _t("Upload completed");
|
||||
if (!success) {
|
||||
text = cancelled ? _t("Cancelled signature upload") : _t("Unable to upload");
|
||||
}
|
||||
|
||||
body = (<div>
|
||||
{ success ?
|
||||
<span>{ _t("Upload completed") }</span> :
|
||||
cancelled ?
|
||||
<span>{ _t("Cancelled signature upload") }</span> :
|
||||
<span>{ _t("Unable to upload") }</span> }
|
||||
<span>{ text }</span>
|
||||
<DialogButtons
|
||||
primaryButton={_t("OK")}
|
||||
hasCancel={false}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue