@@ -4,7 +4,6 @@ import type {NativeEventSubscription} from 'react-native';
44import { AppState , Linking , Platform } from 'react-native' ;
55import type { OnyxEntry } from 'react-native-onyx' ;
66import Onyx , { useOnyx } from 'react-native-onyx' ;
7- import alert from './components/Alert' ;
87import ConfirmModal from './components/ConfirmModal' ;
98import DeeplinkWrapper from './components/DeeplinkWrapper' ;
109import EmojiPicker from './components/EmojiPicker/EmojiPicker' ;
@@ -28,7 +27,7 @@ import * as ActiveClientManager from './libs/ActiveClientManager';
2827import { isSafari } from './libs/Browser' ;
2928import * as Environment from './libs/Environment/Environment' ;
3029import FS from './libs/Fullstory' ;
31- import * as Growl from './libs/Growl' ;
30+ import Growl , { growlRef } from './libs/Growl' ;
3231import Log from './libs/Log' ;
3332import migrateOnyx from './libs/migrateOnyx' ;
3433import 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