Skip to content

Commit 13b5427

Browse files
authored
Merge pull request #61056 from callstack-internal/fix/add-growl-alert-canBeMissing-flag
add growl alert for canBeMissing flag
2 parents f950eb9 + f0a5de3 commit 13b5427

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Expensify.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type {NativeEventSubscription} from 'react-native';
44
import {AppState, Linking, Platform} from 'react-native';
55
import type {OnyxEntry} from 'react-native-onyx';
66
import Onyx, {useOnyx} from 'react-native-onyx';
7-
import alert from './components/Alert';
87
import ConfirmModal from './components/ConfirmModal';
98
import DeeplinkWrapper from './components/DeeplinkWrapper';
109
import EmojiPicker from './components/EmojiPicker/EmojiPicker';
@@ -28,7 +27,7 @@ import * as ActiveClientManager from './libs/ActiveClientManager';
2827
import {isSafari} from './libs/Browser';
2928
import * as Environment from './libs/Environment/Environment';
3029
import FS from './libs/Fullstory';
31-
import * as Growl from './libs/Growl';
30+
import Growl, {growlRef} from './libs/Growl';
3231
import Log from './libs/Log';
3332
import migrateOnyx from './libs/migrateOnyx';
3433
import Navigation from './libs/Navigation/Navigation';
@@ -57,7 +56,7 @@ Onyx.registerLogger(({level, message, parameters}) => {
5756
// when they don't return data.
5857
const shouldShowAlert = typeof parameters === 'object' && !Array.isArray(parameters) && 'showAlert' in parameters && 'key' in parameters;
5958
if (Environment.isDevelopment() && shouldShowAlert) {
60-
alert(`${message} Key: ${parameters.key as string}`);
59+
Growl.error(`${message} Key: ${parameters.key as string}`, 10000);
6160
}
6261
} else if (level === 'hmmm') {
6362
Log.hmmm(message, parameters);
@@ -277,7 +276,7 @@ function Expensify() {
277276
>
278277
{shouldInit && (
279278
<>
280-
<GrowlNotification ref={Growl.growlRef} />
279+
<GrowlNotification ref={growlRef} />
281280
<PopoverReportActionContextMenu ref={ReportActionContextMenu.contextMenuRef} />
282281
<EmojiPicker ref={EmojiPickerAction.emojiPickerRef} />
283282
{/* We include the modal for showing a new update at the top level so the option is always present. */}

0 commit comments

Comments
 (0)