Skip to content

Commit b93a636

Browse files
fix(extension): add notification icon for bitcoin layout [LW-13657 LW-13658] (#2006)
* fix(extension): add notification icon for bitcoin layout * refactor(extension): uniform notification center detection via hook * fix(extension): reduce margin to allow notification icon to fit
1 parent a88edd4 commit b93a636

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

apps/browser-extension-wallet/src/components/MainMenu/MainHeader.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
display: flex;
1313
align-items: center;
1414
justify-content: space-between;
15-
margin: size_unit(1.75) size_unit(3);
15+
margin: size_unit(1.75) size_unit(2.75);
1616
.linkLogo {
1717
display: flex;
1818
align-items: center;

apps/browser-extension-wallet/src/components/NotificationsCenter/NotificationsBellContainer.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@ import React, { useState } from 'react';
22
import { useHistory } from 'react-router';
33
import { Dropdown } from 'antd';
44

5-
import { usePostHogClientContext } from '@providers/PostHogClientProvider';
6-
import { ExperimentName } from '@lib/scripts/types/feature-flags';
75
import { walletRoutePaths } from '@routes';
86

97
import { NotificationsBell } from './NotificationsBell';
108
import { NotificationsDropDown } from './NotificationsDropDown';
9+
import { useNotificationsCenterConfig } from '@hooks/useNotificationsCenterConfig';
1110

1211
export interface NotificationsCenterContainerProps {
1312
popupView?: boolean;
1413
}
1514

1615
export const NotificationsBellContainer = ({ popupView }: NotificationsCenterContainerProps): React.ReactElement => {
17-
const posthog = usePostHogClientContext();
1816
const history = useHistory();
1917
const [isOpen, setIsOpen] = useState(false);
18+
const { isNotificationsCenterEnabled } = useNotificationsCenterConfig();
2019

2120
// TODO Connect with notifications center
2221
const [notifications, setNotifications] = useState<string[]>([]);
@@ -44,7 +43,7 @@ export const NotificationsBellContainer = ({ popupView }: NotificationsCenterCon
4443
};
4544

4645
return (
47-
posthog?.isFeatureFlagEnabled(ExperimentName.NOTIFICATIONS_CENTER) && (
46+
isNotificationsCenterEnabled && (
4847
<Dropdown
4948
onOpenChange={handleOpenChange}
5049
open={isOpen}

apps/browser-extension-wallet/src/views/bitcoin-mode/components/MainMenu/MainHeader.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
.controls {
2828
display: flex;
2929
align-items: center;
30-
gap: size_unit(1);
30+
gap: size_unit(0.75);
3131

3232
.avatar {
3333
font-size: 20px;

apps/browser-extension-wallet/src/views/bitcoin-mode/components/MainMenu/MainHeader.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { useAnalyticsContext, useBackgroundServiceAPIContext, useTheme } from '@
1313
import { PostHogAction } from '@providers/AnalyticsProvider/analyticsTracker';
1414
import { useTranslation } from 'react-i18next';
1515
import { BrowserViewSections } from '@lib/scripts/types';
16+
import { NotificationsBellContainer } from '@components/NotificationsCenter/NotificationsBellContainer';
1617

1718
export const MainHeader = (): React.ReactElement => {
1819
const { t } = useTranslation();
@@ -59,6 +60,7 @@ export const MainHeader = (): React.ReactElement => {
5960
label={t('expandPopup')}
6061
onClick={() => backgroundServices.handleOpenBrowser({ section: locationBrowserSection[location.pathname] })}
6162
/>
63+
<NotificationsBellContainer popupView />
6264
<DropdownMenu isPopup />
6365
</div>
6466
</div>

0 commit comments

Comments
 (0)