1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-12-04 03:22:43 +03:00

Apply strictNullChecks to src/components/views/dialogs/devtools/* (#10391)

This commit is contained in:
Kerry
2023-03-17 12:58:41 +13:00
committed by GitHub
parent 5211b628d6
commit b2c046689e
9 changed files with 34 additions and 26 deletions

View File

@@ -1,5 +1,6 @@
/*
Copyright 2022 Michael Telatynski <7t3chguy@gmail.com>
Copyright 2023 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -38,7 +39,7 @@ interface IProps extends IMinProps {
}
const BaseTool: React.FC<XOR<IMinProps, IProps>> = ({ className, actionLabel, onBack, onAction, children }) => {
const [message, setMessage] = useState<string>(null);
const [message, setMessage] = useState<string | null>(null);
const onBackClick = (): void => {
if (message) {
@@ -48,7 +49,7 @@ const BaseTool: React.FC<XOR<IMinProps, IProps>> = ({ className, actionLabel, on
}
};
let actionButton: JSX.Element;
let actionButton: ReactNode = null;
if (message) {
children = message;
} else if (onAction) {