Conform more of the codebase to strictNullChecks (#10602)

* Conform more of the codebase to `strictNullChecks`

* Conform more of the codebase to `strictNullChecks`

* Fix types
This commit is contained in:
Michael Telatynski 2023-04-17 08:31:58 +01:00 committed by GitHub
parent 93858813a3
commit daad630827
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 79 additions and 49 deletions

View file

@ -16,7 +16,7 @@ limitations under the License.
import classNames from "classnames";
import { EventType } from "matrix-js-sdk/src/@types/event";
import React, { useContext, useRef, useState, MouseEvent, ReactNode, RefObject } from "react";
import React, { useContext, useRef, useState, MouseEvent, ReactNode } from "react";
import MatrixClientContext from "../../../contexts/MatrixClientContext";
import RoomContext from "../../../contexts/RoomContext";
@ -59,7 +59,7 @@ const MiniAvatarUploader: React.FC<IProps> = ({
setShow(false);
}, 13000); // hide after being shown for 10 seconds
const uploadRef = useRef() as RefObject<HTMLInputElement>;
const uploadRef = useRef<HTMLInputElement>(null);
const label = hasAvatar || busy ? hasAvatarLabel : noAvatarLabel;