🏷️(frontend) make controlbar props readonly for enhanced type safety

Strengthens type safety by ensuring props immutability and catching
potential side effects during development.
This commit is contained in:
lebaudantoine
2025-08-22 12:35:55 +02:00
committed by aleb_the_flash
parent ba422110f8
commit 04f7412307
2 changed files with 6 additions and 2 deletions

View File

@@ -13,7 +13,9 @@ import { useRef } from 'react'
import { VideoDeviceControl } from '../../components/controls/Device/VideoDeviceControl'
import { AudioDevicesControl } from '../../components/controls/Device/AudioDevicesControl'
export function DesktopControlBar({ onDeviceError }: ControlBarAuxProps) {
export function DesktopControlBar({
onDeviceError,
}: Readonly<ControlBarAuxProps>) {
const browserSupportsScreenSharing = supportsScreenSharing()
const desktopControlBarEl = useRef<HTMLDivElement>(null)
return (

View File

@@ -26,7 +26,9 @@ import { useConfig } from '@/api/useConfig'
import { AudioDevicesControl } from '../../components/controls/Device/AudioDevicesControl'
import { VideoDeviceControl } from '../../components/controls/Device/VideoDeviceControl'
export function MobileControlBar({ onDeviceError }: ControlBarAuxProps) {
export function MobileControlBar({
onDeviceError,
}: Readonly<ControlBarAuxProps>) {
const { t } = useTranslation('rooms')
const [isMenuOpened, setIsMenuOpened] = React.useState(false)
const browserSupportsScreenSharing = supportsScreenSharing()