You've already forked matrix-react-sdk
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user