From e80b9c2485251576f267f01bd668a7f7d10c9532 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Fri, 22 Aug 2025 12:39:07 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A(frontend)=20rename=20screenshare?= =?UTF-8?q?=20preference=20store=20for=20naming=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update screenshare preference store name to follow established naming convention used across other preference stores. --- .../rooms/livekit/components/FullScreenShareWarning.tsx | 6 +++--- ...{ScreenSharePreferences.ts => screenSharePreferences.ts} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/frontend/src/stores/{ScreenSharePreferences.ts => screenSharePreferences.ts} (60%) diff --git a/src/frontend/src/features/rooms/livekit/components/FullScreenShareWarning.tsx b/src/frontend/src/features/rooms/livekit/components/FullScreenShareWarning.tsx index decdb784..952b7885 100644 --- a/src/frontend/src/features/rooms/livekit/components/FullScreenShareWarning.tsx +++ b/src/frontend/src/features/rooms/livekit/components/FullScreenShareWarning.tsx @@ -1,7 +1,7 @@ import { css } from '@/styled-system/css' import { Button, Text } from '@/primitives' import { useMemo, useRef } from 'react' -import { ScreenSharePreferenceStore } from '@/stores/ScreenSharePreferences' +import { screenSharePreferenceStore } from '@/stores/screenSharePreferences' import { useSnapshot } from 'valtio' import { useLocalParticipant } from '@livekit/components-react' import { useSize } from '../hooks/useResizeObserver' @@ -18,7 +18,7 @@ export const FullScreenShareWarning = ({ const warningContainerRef = useRef(null) const { width: containerWidth } = useSize(warningContainerRef) const { localParticipant } = useLocalParticipant() - const screenSharePreferences = useSnapshot(ScreenSharePreferenceStore) + const screenSharePreferences = useSnapshot(screenSharePreferenceStore) const isFullScreenSharing = useMemo(() => { if (trackReference?.source !== 'screen_share') return false @@ -62,7 +62,7 @@ export const FullScreenShareWarning = ({ } const handleDismissWarning = () => { - ScreenSharePreferenceStore.enabled = false + screenSharePreferenceStore.enabled = false } if (!shouldShowWarning) return null diff --git a/src/frontend/src/stores/ScreenSharePreferences.ts b/src/frontend/src/stores/screenSharePreferences.ts similarity index 60% rename from src/frontend/src/stores/ScreenSharePreferences.ts rename to src/frontend/src/stores/screenSharePreferences.ts index 1c2bba23..addb999d 100644 --- a/src/frontend/src/stores/ScreenSharePreferences.ts +++ b/src/frontend/src/stores/screenSharePreferences.ts @@ -4,6 +4,6 @@ type State = { enabled: boolean } -export const ScreenSharePreferenceStore = proxy({ +export const screenSharePreferenceStore = proxy({ enabled: true, })