typescript src/input (#487)

This commit is contained in:
Timo 2022-08-09 11:44:46 +02:00 committed by GitHub
commit f554afd6b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 120 additions and 41 deletions

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React, { useCallback, useEffect, useState } from "react";
import React, { ChangeEvent, useCallback, useEffect, useState } from "react";
import { MatrixClient } from "matrix-js-sdk";
import { Button } from "../button";
@ -47,7 +47,7 @@ export function ProfileModal({ client, ...rest }: Props) {
}, []);
const onChangeDisplayName = useCallback(
(e) => {
(e: ChangeEvent<HTMLInputElement>) => {
setDisplayName(e.target.value);
},
[setDisplayName]