Commit fd94d4d 1 parent d8a54db commit fd94d4d Copy full SHA for fd94d4d
File tree 2 files changed +16
-2
lines changed
core/src/App/Containers/RootComponent
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import { moduleLoader } from '@deriv/shared' ;
2
+
3
3
import { useOauth2 } from '@deriv/hooks' ;
4
+ import { moduleLoader } from '@deriv/shared' ;
4
5
import { observer , useStore } from '@deriv/stores' ;
5
6
6
7
const AppStore = React . lazy ( ( ) =>
@@ -19,7 +20,11 @@ const Wallets = React.lazy(() =>
19
20
20
21
const RootComponent = observer ( props => {
21
22
const { client, ui } = useStore ( ) ;
22
- const { is_wallets_onboarding_tour_guide_visible, setIsWalletsOnboardingTourGuideVisible } = ui ;
23
+ const {
24
+ is_wallets_onboarding_tour_guide_visible,
25
+ setIsWalletsOnboardingTourGuideVisible,
26
+ notification_messages_ui,
27
+ } = ui ;
23
28
const { has_wallet, logout } = client ;
24
29
25
30
const { oAuthLogout } = useOauth2 ( { handleLogout : logout } ) ;
@@ -34,6 +39,7 @@ const RootComponent = observer(props => {
34
39
logout = { async ( ) => {
35
40
await oAuthLogout ( ) ;
36
41
} }
42
+ notificationMessagesUi = { notification_messages_ui }
37
43
onWalletsOnboardingTourGuideCloseHandler = { onWalletsOnboardingTourGuideCloseHandler }
38
44
/>
39
45
) : (
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ import './index.scss';
13
13
type TProps = {
14
14
isWalletsOnboardingTourGuideVisible : boolean ;
15
15
logout : ( ) => Promise < void > ;
16
+ notificationMessagesUi : ( props ?: {
17
+ is_mt5 ?: boolean ;
18
+ is_notification_loaded ?: boolean ;
19
+ show_trade_notifications ?: boolean ;
20
+ stopNotificationLoading ?: VoidFunction ;
21
+ } ) => JSX . Element ;
16
22
onWalletsOnboardingTourGuideCloseHandler : VoidFunction ;
17
23
} ;
18
24
@@ -21,6 +27,7 @@ const LazyWalletTourGuide = lazy(() => import('./components/WalletTourGuide/Wall
21
27
const App : React . FC < TProps > = ( {
22
28
isWalletsOnboardingTourGuideVisible,
23
29
logout,
30
+ notificationMessagesUi : Notifications ,
24
31
onWalletsOnboardingTourGuideCloseHandler,
25
32
} ) => {
26
33
const [ preferredLanguage , setPreferredLanguage ] = useState < TLanguageType | null > ( null ) ;
@@ -42,6 +49,7 @@ const App: React.FC<TProps> = ({
42
49
< TranslationProvider defaultLang = { defaultLanguage } i18nInstance = { i18nInstance } >
43
50
< React . Suspense fallback = { < Loader /> } >
44
51
< ModalProvider >
52
+ { Notifications && < Notifications /> }
45
53
< AppContent
46
54
isWalletsOnboardingTourGuideVisible = { isWalletsOnboardingTourGuideVisible }
47
55
setPreferredLanguage = { setPreferredLanguage }
You can’t perform that action at this time.
0 commit comments