Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
display: flex;
align-items: center;
justify-content: space-between;
margin: size_unit(1.75) size_unit(3);
margin: size_unit(1.75) size_unit(2.75);
.linkLogo {
display: flex;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@ import React, { useState } from 'react';
import { useHistory } from 'react-router';
import { Dropdown } from 'antd';

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

import { NotificationsBell } from './NotificationsBell';
import { NotificationsDropDown } from './NotificationsDropDown';
import { useNotificationsCenterConfig } from '@hooks/useNotificationsCenterConfig';

export interface NotificationsCenterContainerProps {
popupView?: boolean;
}

export const NotificationsBellContainer = ({ popupView }: NotificationsCenterContainerProps): React.ReactElement => {
const posthog = usePostHogClientContext();
const history = useHistory();
const [isOpen, setIsOpen] = useState(false);
const { isNotificationsCenterEnabled } = useNotificationsCenterConfig();

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

return (
posthog?.isFeatureFlagEnabled(ExperimentName.NOTIFICATIONS_CENTER) && (
isNotificationsCenterEnabled && (
<Dropdown
onOpenChange={handleOpenChange}
open={isOpen}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
.controls {
display: flex;
align-items: center;
gap: size_unit(1);
gap: size_unit(0.75);

.avatar {
font-size: 20px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { useAnalyticsContext, useBackgroundServiceAPIContext, useTheme } from '@
import { PostHogAction } from '@providers/AnalyticsProvider/analyticsTracker';
import { useTranslation } from 'react-i18next';
import { BrowserViewSections } from '@lib/scripts/types';
import { NotificationsBellContainer } from '@components/NotificationsCenter/NotificationsBellContainer';

export const MainHeader = (): React.ReactElement => {
const { t } = useTranslation();
Expand Down Expand Up @@ -59,6 +60,7 @@ export const MainHeader = (): React.ReactElement => {
label={t('expandPopup')}
onClick={() => backgroundServices.handleOpenBrowser({ section: locationBrowserSection[location.pathname] })}
/>
<NotificationsBellContainer popupView />
<DropdownMenu isPopup />
</div>
</div>
Expand Down
Loading