Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit bbe6e32

Browse files
author
Kerry Archibald
committed
tidy
Signed-off-by: Kerry Archibald <[email protected]>
1 parent fe689b1 commit bbe6e32

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/components/views/beacon/RoomLiveShareWarning.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type LiveBeaconsState = {
4242
onStopSharing?: () => void;
4343
stoppingInProgress?: boolean;
4444
};
45+
4546
const useLiveBeacons = (roomId: Room['roomId']): LiveBeaconsState => {
4647
const [stoppingInProgress, setStoppingInProgress] = useState(false);
4748
const liveBeaconIds = useEventEmitterState(
@@ -53,7 +54,7 @@ const useLiveBeacons = (roomId: Room['roomId']): LiveBeaconsState => {
5354
// reset stopping in progress on change in live ids
5455
useEffect(() => {
5556
setStoppingInProgress(false);
56-
}, [liveBeaconIds, setStoppingInProgress]);
57+
}, [liveBeaconIds]);
5758

5859
if (!liveBeaconIds?.length) {
5960
return { liveBeaconIds };

src/stores/OwnBeaconStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ export class OwnBeaconStore extends AsyncStoreWithClient<OwnBeaconStoreState> {
164164
};
165165

166166
private checkLiveness = (): void => {
167-
const prevLiveness = this.getLiveBeaconIds();
167+
const prevLiveBeaconIds = this.getLiveBeaconIds();
168168
this.liveBeaconIds = [...this.beacons.values()]
169169
.filter(beacon => beacon.isLive)
170170
.map(beacon => beacon.identifier);
171171

172-
if (arrayHasDiff(prevLiveness, this.liveBeaconIds)) {
172+
if (arrayHasDiff(prevLiveBeaconIds, this.liveBeaconIds)) {
173173
this.emit(OwnBeaconStoreEvent.LivenessChange, this.liveBeaconIds);
174174
}
175175
};

0 commit comments

Comments
 (0)