Skip to content

add growl alert for canBeMissing flag #61056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/Expensify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type {NativeEventSubscription} from 'react-native';
import {AppState, Linking, Platform} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import Onyx, {useOnyx} from 'react-native-onyx';
import alert from './components/Alert';
import ConfirmModal from './components/ConfirmModal';
import DeeplinkWrapper from './components/DeeplinkWrapper';
import EmojiPicker from './components/EmojiPicker/EmojiPicker';
Expand All @@ -28,7 +27,7 @@ import * as ActiveClientManager from './libs/ActiveClientManager';
import {isSafari} from './libs/Browser';
import * as Environment from './libs/Environment/Environment';
import FS from './libs/Fullstory';
import * as Growl from './libs/Growl';
import Growl, {growlRef} from './libs/Growl';
import Log from './libs/Log';
import migrateOnyx from './libs/migrateOnyx';
import Navigation from './libs/Navigation/Navigation';
Expand Down Expand Up @@ -57,7 +56,7 @@ Onyx.registerLogger(({level, message, parameters}) => {
// when they don't return data.
const shouldShowAlert = typeof parameters === 'object' && !Array.isArray(parameters) && 'showAlert' in parameters && 'key' in parameters;
if (Environment.isDevelopment() && shouldShowAlert) {
alert(`${message} Key: ${parameters.key as string}`);
Growl.error(`${message} Key: ${parameters.key as string}`, 10000);
}
} else if (level === 'hmmm') {
Log.hmmm(message, parameters);
Expand Down Expand Up @@ -277,7 +276,7 @@ function Expensify() {
>
{shouldInit && (
<>
<GrowlNotification ref={Growl.growlRef} />
<GrowlNotification ref={growlRef} />
<PopoverReportActionContextMenu ref={ReportActionContextMenu.contextMenuRef} />
<EmojiPicker ref={EmojiPickerAction.emojiPickerRef} />
{/* We include the modal for showing a new update at the top level so the option is always present. */}
Expand Down
Loading