Skip to content

Commit 396e70c

Browse files
committed
fix(perf): Chunk and lazy load BackgroundFiltersProvider
1 parent 4f060c8 commit 396e70c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

sample-apps/react/react-dogfood/components/DegradedPerformanceNotification.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { PropsWithChildren, useMemo } from 'react';
22
import { Placement } from '@floating-ui/react';
33
import {
44
Notification,
5-
PerformanceDegradationReason,
65
useBackgroundFilters,
76
useI18n,
87
} from '@stream-io/video-react-sdk';
@@ -29,12 +28,8 @@ export const DegradedPerformanceNotification = ({
2928
}
3029

3130
const reasons = performance?.reason || [];
32-
const hasFrameDrop = reasons.includes(
33-
PerformanceDegradationReason.FRAME_DROP,
34-
);
35-
const hasCpuThrottling = reasons.includes(
36-
PerformanceDegradationReason.CPU_THROTTLING,
37-
);
31+
const hasFrameDrop = reasons.includes('frame-drop');
32+
const hasCpuThrottling = reasons.includes('cpu-throttling');
3833

3934
if (hasFrameDrop && hasCpuThrottling) {
4035
return t(

0 commit comments

Comments
 (0)