Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions imports/client/components/CallSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const SelfBox = ({
deafened: boolean;
audioContext: AudioContext;
stream: MediaStream;
popperBoundaryRef: React.RefObject<HTMLElement>;
popperBoundaryRef: React.RefObject<HTMLElement | null>;
}) => {
const spectraDisabled = useTracker(() => Flags.active("disable.spectra"));
const { userId, name, discordAccount } = useTracker(() => {
Expand Down Expand Up @@ -285,7 +285,7 @@ const PeerBox = ({
audioContext: AudioContext;
selfDeafened: boolean;
peer: PeerType;
popperBoundaryRef: React.RefObject<HTMLElement>;
popperBoundaryRef: React.RefObject<HTMLElement | null>;
stream: MediaStream | undefined;
}) => {
const spectraDisabled = useTracker(() => Flags.active("disable.spectra"));
Expand Down
2 changes: 1 addition & 1 deletion imports/client/components/ChatPeople.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ interface ViewerSubscriber {

interface PersonBoxProps extends ViewerSubscriber {
children?: ReactNode;
popperBoundaryRef: React.RefObject<HTMLElement>;
popperBoundaryRef: React.RefObject<HTMLElement | null>;
}

const ViewerPersonBox = ({
Expand Down
2 changes: 1 addition & 1 deletion imports/client/hooks/useCallState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ const useTransport = (
transportParams: TransportType | undefined,
dispatch: React.Dispatch<Action>,
) => {
const connectRef = useRef<() => void>();
const connectRef = useRef<(() => void) | undefined>(undefined);

const hasParams = !!device && !!transportParams;
useEffect(() => {
Expand Down
4 changes: 3 additions & 1 deletion imports/client/hooks/useFocusRefOnFindHotkey.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { RefObject } from "react";
import { useCallback, useEffect } from "react";

function useFocusRefOnFindHotkey<T extends HTMLElement>(nodeRef: RefObject<T>) {
function useFocusRefOnFindHotkey<T extends HTMLElement | null>(
nodeRef: RefObject<T>,
) {
const maybeStealCtrlF = useCallback(
(e: KeyboardEvent) => {
const isMac = navigator.userAgent.includes("Mac");
Expand Down
2 changes: 1 addition & 1 deletion imports/client/hooks/useImmediateEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function useImmediateEffect<T>(
deps?: Array<T>,
) {
const cleanupRef = useRef<ReturnType<EffectCallback>>(undefined);
const depsRef = useRef<Array<T> | undefined>();
const depsRef = useRef<Array<T> | undefined>(undefined);

if (!depsRef.current || depsDiffer(depsRef.current, deps)) {
depsRef.current = deps;
Expand Down