typescript src/room (#437)

This commit is contained in:
Timo
2022-08-02 00:46:16 +02:00
committed by GitHub
parent c723fae0e2
commit 2d99acabe2
37 changed files with 465 additions and 284 deletions

View File

@@ -32,9 +32,8 @@ import { useDownloadDebugLog } from "./submit-rageshake";
import { Body } from "../typography/Typography";
interface Props {
setShowInspector: boolean;
showInspector: boolean;
[rest: string]: unknown;
isOpen: boolean;
onClose: () => void;
}
export const SettingsModal = (props: Props) => {

View File

@@ -26,11 +26,11 @@ import { InspectorContext } from "../room/GroupCallInspector";
import { useModalTriggerState } from "../Modal";
interface RageShakeSubmitOptions {
description: string;
roomId?: string;
label?: string;
sendLogs: boolean;
rageshakeRequestId?: string;
description?: string;
roomId?: string;
label?: string;
}
export function useSubmitRageshake(): {
@@ -40,7 +40,7 @@ export function useSubmitRageshake(): {
error: Error;
} {
const client: MatrixClient = useClient().client;
const [{ json }] = useContext(InspectorContext);
const json = useContext(InspectorContext);
const [{ sending, sent, error }, setState] = useState({
sending: false,
@@ -274,7 +274,7 @@ export function useSubmitRageshake(): {
}
export function useDownloadDebugLog(): () => void {
const [{ json }] = useContext(InspectorContext);
const json = useContext(InspectorContext);
const downloadDebugLog = useCallback(() => {
const blob = new Blob([JSON.stringify(json)], { type: "application/json" });

View File

@@ -24,6 +24,7 @@ import React, {
useMemo,
useContext,
createContext,
ReactNode,
} from "react";
export interface MediaHandlerContextInterface {
@@ -73,7 +74,7 @@ function updateMediaPreferences(newPreferences: MediaPreferences): void {
}
interface Props {
client: MatrixClient;
children: JSX.Element[];
children: ReactNode;
}
export function MediaHandlerProvider({ client, children }: Props): JSX.Element {
const [