typescript src/room (#437)

This commit is contained in:
Timo 2022-08-02 00:46:16 +02:00 committed by GitHub
commit 2d99acabe2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 465 additions and 284 deletions

View file

@ -16,13 +16,16 @@ limitations under the License.
import React, { useCallback, useState } from "react";
import { SequenceDiagramViewer } from "./room/GroupCallInspector";
import {
SequenceDiagramViewer,
SequenceDiagramMatrixEvent,
} from "./room/GroupCallInspector";
import { FieldRow, InputField } from "./input/Input";
import { usePageTitle } from "./usePageTitle";
interface DebugLog {
localUserId: string;
eventsByUserId: Record<string, {}>;
eventsByUserId: { [userId: string]: SequenceDiagramMatrixEvent[] };
remoteUserIds: string[];
}
@ -33,7 +36,7 @@ export function SequenceDiagramViewerPage() {
const [selectedUserId, setSelectedUserId] = useState<string>();
const onChangeDebugLog = useCallback((e) => {
if (e.target.files && e.target.files.length > 0) {
e.target.files[0].text().then((text) => {
e.target.files[0].text().then((text: string) => {
setDebugLog(JSON.parse(text));
});
}