Import log instead of using it off of window

This commit is contained in:
Josh Perez 2021-09-17 14:27:53 -04:00 committed by GitHub
parent 8eb0dd3116
commit 65ddf0a9e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
155 changed files with 3654 additions and 3433 deletions

View file

@ -18,6 +18,7 @@ import { useGetCallingFrameBuffer } from '../calling/useGetCallingFrameBuffer';
import { LocalizerType } from '../types/Util';
import { usePageVisibility } from '../util/hooks';
import { nonRenderedRemoteParticipant } from '../util/ringrtc/nonRenderedRemoteParticipant';
import * as log from '../logging/log';
const MIN_RENDERED_HEIGHT = 180;
const PARTICIPANT_MARGIN = 10;
@ -197,9 +198,7 @@ export const GroupCallRemoteParticipants: React.FC<PropsType> = ({
// the LARGER of the two could cause overflow.)
const widestRow = maxBy(rows, totalRemoteParticipantWidthAtMinHeight);
if (!widestRow) {
window.log.error(
'Unable to find the widest row, which should be impossible'
);
log.error('Unable to find the widest row, which should be impossible');
continue;
}
const widthScalar =
@ -331,7 +330,7 @@ export const GroupCallRemoteParticipants: React.FC<PropsType> = ({
bounds
onResize={({ bounds }) => {
if (!bounds) {
window.log.error('We should be measuring the bounds');
log.error('We should be measuring the bounds');
return;
}
setContainerDimensions(bounds);
@ -346,7 +345,7 @@ export const GroupCallRemoteParticipants: React.FC<PropsType> = ({
bounds
onResize={({ bounds }) => {
if (!bounds) {
window.log.error('We should be measuring the bounds');
log.error('We should be measuring the bounds');
return;
}
setGridDimensions(bounds);