From 480b55c36aedfed284935e2e5de77bf03301cc97 Mon Sep 17 00:00:00 2001 From: George Usynin <103181646+heorhi-deriv@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:16:42 +0300 Subject: [PATCH] =?UTF-8?q?[WALL]=20george=20/=20WALL-5235=20/=20Notificat?= =?UTF-8?q?ion=20Missing=20on=20Trader=E2=80=99s=20Hub=20Page=20for=20Wall?= =?UTF-8?q?et=20Accounts=20(#17802)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: enhance RootComponent and App to include notification messages UI * fix: update notifications display logic in App component --- .../src/App/Containers/RootComponent/root-component.jsx | 7 ++++++- packages/wallets/src/App.tsx | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/core/src/App/Containers/RootComponent/root-component.jsx b/packages/core/src/App/Containers/RootComponent/root-component.jsx index d4cb7dc23f49..d175670e45d1 100644 --- a/packages/core/src/App/Containers/RootComponent/root-component.jsx +++ b/packages/core/src/App/Containers/RootComponent/root-component.jsx @@ -20,7 +20,11 @@ const Wallets = React.lazy(() => const RootComponent = observer(props => { const { client, ui } = useStore(); - const { is_wallets_onboarding_tour_guide_visible, setIsWalletsOnboardingTourGuideVisible } = ui; + const { + is_wallets_onboarding_tour_guide_visible, + setIsWalletsOnboardingTourGuideVisible, + notification_messages_ui, + } = ui; const { has_wallet, logout } = client; const { oAuthLogout } = useOauth2({ handleLogout: logout }); @@ -35,6 +39,7 @@ const RootComponent = observer(props => { logout={async () => { await oAuthLogout(); }} + notificationMessagesUi={notification_messages_ui} onWalletsOnboardingTourGuideCloseHandler={onWalletsOnboardingTourGuideCloseHandler} /> ) : ( diff --git a/packages/wallets/src/App.tsx b/packages/wallets/src/App.tsx index 07343f9d9430..41793dc31d1b 100644 --- a/packages/wallets/src/App.tsx +++ b/packages/wallets/src/App.tsx @@ -13,6 +13,12 @@ import './index.scss'; type TProps = { isWalletsOnboardingTourGuideVisible: boolean; logout: () => Promise; + notificationMessagesUi: (props?: { + is_mt5?: boolean; + is_notification_loaded?: boolean; + show_trade_notifications?: boolean; + stopNotificationLoading?: VoidFunction; + }) => JSX.Element; onWalletsOnboardingTourGuideCloseHandler: VoidFunction; }; @@ -21,6 +27,7 @@ const LazyWalletTourGuide = lazy(() => import('./components/WalletTourGuide/Wall const App: React.FC = ({ isWalletsOnboardingTourGuideVisible, logout, + notificationMessagesUi: Notifications, onWalletsOnboardingTourGuideCloseHandler, }) => { const [preferredLanguage, setPreferredLanguage] = useState(null); @@ -42,6 +49,7 @@ const App: React.FC = ({ }> + {!isWalletsOnboardingTourGuideVisible && Notifications && }