Make more of the codebase conform to strict types (#10859)

This commit is contained in:
Michael Telatynski 2023-05-12 09:49:37 +01:00 committed by GitHub
parent 6f58dd49e3
commit f758cbd38a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 111 additions and 105 deletions

View file

@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React, { FormEvent, useEffect, useState } from "react";
import React, { useEffect, useState } from "react";
import { _t } from "../../../../languageHandler";
import AccessibleButton from "../../elements/AccessibleButton";
import AccessibleButton, { ButtonEvent } from "../../elements/AccessibleButton";
import Field from "../../elements/Field";
import LearnMore from "../../elements/LearnMore";
import Spinner from "../../elements/Spinner";
@ -41,7 +41,7 @@ const DeviceNameEditor: React.FC<Props & { stopEditing: () => void }> = ({ devic
const onInputChange = (event: React.ChangeEvent<HTMLInputElement>): void => setDeviceName(event.target.value);
const onSubmit = async (event: FormEvent<HTMLFormElement>): Promise<void> => {
const onSubmit = async (event: ButtonEvent): Promise<void> => {
setIsLoading(true);
setError(null);
event.preventDefault();