Skip to content

Commit 068dbc8

Browse files
authored
fix(app): default camera usage state to disabled (#20104)
#20100 ensures that configuring a camera usage setting 503s if the camera is disconnected, but the default state is to render the camera as `enabled` if we can't GET the camera usage settings. We should do the exact opposite of that.
1 parent 7ed8d0c commit 068dbc8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/src/local-resources/images/hooks/useCameraUsageSettings.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ export function useCameraUsageSettings(): UseCameraUsageSettingsResult {
2222
})
2323
const { mutateAsync: updateCamera } = useUpdateCamera()
2424

25-
const [isCameraEnabled, setIsCameraEnabled] = useState(true)
26-
const [isLiveVideoEnabled, setIsLiveVideoEnabled] = useState(true)
27-
const [isRecoveryCaptureEnabled, setIsRecoveryCaptureEnabled] = useState(true)
25+
const [isCameraEnabled, setIsCameraEnabled] = useState(false)
26+
const [isLiveVideoEnabled, setIsLiveVideoEnabled] = useState(false)
27+
const [isRecoveryCaptureEnabled, setIsRecoveryCaptureEnabled] =
28+
useState(false)
2829

2930
useEffect(() => {
3031
if (cameraData) {

0 commit comments

Comments
 (0)