typescript src/room (#437)
This commit is contained in:
parent
c723fae0e2
commit
2d99acabe2
37 changed files with 467 additions and 286 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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" });
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue