Skip to content

Commit e892368

Browse files
committed
bump to 0.2.9
1 parent c5ccefd commit e892368

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

packages/scan/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scan",
3-
"version": "0.2.8",
3+
"version": "0.2.9",
44
"description": "Scan your React app for renders",
55
"keywords": ["react", "react-scan", "react scan", "render", "performance"],
66
"homepage": "https://react-scan.million.dev",

packages/scan/src/core/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ const validateOptions = (options: Partial<Options>): Partial<Options> => {
344344
// case 'includeChildren':
345345
case 'log':
346346
case 'showToolbar':
347+
case 'showFPS':
347348
// case 'report':
348349
// case 'alwaysShowLabels':
349350
case 'dangerouslyForceRunInProduction':

packages/scan/src/web/views/notifications/details-routes.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const DetailsRoutes = () => {
8787
) {
8888
prev.audioNotificationsOptions.audioContext?.close();
8989
}
90+
localStorage.setItem('react-scan-notifications-audio', 'false');
9091
return {
9192
...prev,
9293
audioNotificationsOptions: {

packages/scan/src/web/views/notifications/notification-tabs.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import { playNotificationSound } from '~core/utils';
66

77
export const NotificationTabs = ({
88
selectedEvent: _,
9-
}: { selectedEvent: NotificationEvent }) => {
9+
}: {
10+
selectedEvent: NotificationEvent;
11+
}) => {
1012
const { notificationState, setNotificationState, setRoute } =
1113
useNotificationsContext();
1214
return (
@@ -81,15 +83,22 @@ export const NotificationTabs = ({
8183
) {
8284
prev.audioNotificationsOptions.audioContext.close();
8385
}
86+
const prevEnabledState = prev.audioNotificationsOptions.enabled;
87+
localStorage.setItem(
88+
'react-scan-notifications-audio',
89+
String(!prevEnabledState),
90+
);
8491

8592
const audioContext = new AudioContext();
8693
if (!prev.audioNotificationsOptions.enabled) {
8794
playNotificationSound(audioContext);
8895
}
96+
if (prevEnabledState) {
97+
audioContext.close();
98+
}
8999
return {
90100
...prev,
91-
audioNotificationsOptions: prev.audioNotificationsOptions
92-
.enabled
101+
audioNotificationsOptions: prevEnabledState
93102
? {
94103
audioContext: null,
95104
enabled: false,

0 commit comments

Comments
 (0)