typescript src/input (#487)

This commit is contained in:
Timo
2022-08-09 11:44:46 +02:00
committed by GitHub
parent 5474693711
commit f554afd6b1
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]