Open source video conferencing app powered by LiveKit. Built with Django and React.
⚡️(frontend) avoid non-primitive default props recreation on each render
lebaudantoineca9c7fc15266
diff --git a/src/frontend/src/features/settings/components/tabs/VideoTab.tsx b/src/frontend/src/features/settings/components/tabs/VideoTab.tsxindex 4bbcf62d..90607654 100644--- a/src/frontend/src/features/settings/components/tabs/VideoTab.tsx+++ b/src/frontend/src/features/settings/components/tabs/VideoTab.tsx@@ -22,6 +22,8 @@ export type VideoTabProps = Pick<DialogProps, 'onOpenChange'> &type DeviceItems = Array<{ value: string; label: string }>+const EMPTY_PROPS = {}+export const VideoTab = ({ id }: VideoTabProps) => {const { t } = useTranslation('settings', { keyPrefix: 'video' })const { localParticipant, remoteParticipants } = useRoomContext()@@ -59,7 +61,7 @@ export const VideoTab = ({ id }: VideoTabProps) => {const isCamEnabled = devicesIn?.length > 0const disabledProps = isCamEnabled- ? {}+ ? EMPTY_PROPS: {placeholder: t('permissionsRequired'),isDisabled: true,