Merge branch 'livekit' into new-call-layouts

This commit is contained in:
Robin
2024-07-18 11:38:35 -04:00
11 changed files with 909 additions and 1099 deletions

View File

@@ -53,7 +53,7 @@ function useMuteState(
): MuteState {
const [enabled, setEnabled] = useReactiveState<boolean | undefined>(
(prev) =>
device.available.length > 0 ? prev ?? enabledByDefault() : undefined,
device.available.length > 0 ? (prev ?? enabledByDefault()) : undefined,
[device],
);
return useMemo(

View File

@@ -63,7 +63,7 @@ export function useFullscreen(items: string[]): {
} {
const [fullscreenItem, setFullscreenItem] = useReactiveState<string | null>(
(prevItem) =>
prevItem == null ? null : items.find((i) => i === prevItem) ?? null,
prevItem == null ? null : (items.find((i) => i === prevItem) ?? null),
[items],
);
@@ -77,7 +77,7 @@ export function useFullscreen(items: string[]): {
(itemId: string) => {
setFullscreenItem(
latestFullscreenItem.current === null
? latestItems.current.find((i) => i === itemId) ?? null
? (latestItems.current.find((i) => i === itemId) ?? null)
: null,
);
},