mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-31 07:00:26 +00:00
additional lint fixes
This commit is contained in:
@@ -362,7 +362,7 @@ export function Grid<
|
||||
// Because we're using react-spring in imperative mode, we're responsible for
|
||||
// firing animations manually whenever the tiles array updates
|
||||
useEffect(() => {
|
||||
springRef.start();
|
||||
void springRef.start();
|
||||
}, [placedTiles, springRef]);
|
||||
|
||||
const animateDraggedTile = (
|
||||
@@ -372,7 +372,7 @@ export function Grid<
|
||||
const { tileId, tileX, tileY } = dragState.current!;
|
||||
const tile = placedTiles.find((t) => t.id === tileId)!;
|
||||
|
||||
springRef.current
|
||||
void springRef.current
|
||||
.find((c) => (c.item as Tile<TileModel>).id === tileId)
|
||||
?.start(
|
||||
endOfGesture
|
||||
|
||||
@@ -31,7 +31,7 @@ describe("CallList", () => {
|
||||
);
|
||||
};
|
||||
|
||||
it("should show room", async () => {
|
||||
it("should show room", () => {
|
||||
const rooms = [
|
||||
{
|
||||
roomName: "Room #1",
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
useMemo,
|
||||
} from "react";
|
||||
import { IWidgetApiRequest } from "matrix-widget-api";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import { MediaDevice, useMediaDevices } from "../livekit/MediaDevicesContext";
|
||||
import { useReactiveState } from "../useReactiveState";
|
||||
@@ -83,10 +84,14 @@ export function useMuteStates(): MuteStates {
|
||||
const video = useMuteState(devices.videoInput, () => true);
|
||||
|
||||
useEffect(() => {
|
||||
widget?.api.transport.send(ElementWidgetActions.DeviceMute, {
|
||||
audio_enabled: audio.enabled,
|
||||
video_enabled: video.enabled,
|
||||
});
|
||||
widget?.api.transport
|
||||
.send(ElementWidgetActions.DeviceMute, {
|
||||
audio_enabled: audio.enabled,
|
||||
video_enabled: video.enabled,
|
||||
})
|
||||
.catch((e) =>
|
||||
logger.warn("Could not send DeviceMute action to widget", e),
|
||||
);
|
||||
}, [audio, video]);
|
||||
|
||||
const onMuteStateChangeRequest = useCallback(
|
||||
|
||||
@@ -20,17 +20,21 @@ import posthog from "posthog-js";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
import { afterEach, beforeEach } from "vitest";
|
||||
import { cleanup } from "@testing-library/react";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import { Config } from "./config/Config";
|
||||
|
||||
// Bare-minimum i18n config
|
||||
i18n.use(initReactI18next).init({
|
||||
lng: "en-GB",
|
||||
fallbackLng: "en-GB",
|
||||
interpolation: {
|
||||
escapeValue: false, // React has built-in XSS protections
|
||||
},
|
||||
});
|
||||
i18n
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
lng: "en-GB",
|
||||
fallbackLng: "en-GB",
|
||||
interpolation: {
|
||||
escapeValue: false, // React has built-in XSS protections
|
||||
},
|
||||
})
|
||||
.catch((e) => logger.warn("Failed to init i18n for testing", e));
|
||||
|
||||
Config.initDefault();
|
||||
posthog.opt_out_capturing();
|
||||
|
||||
Reference in New Issue
Block a user