Skip to content

Commit 6fb8c8f

Browse files
committed
fixup! feat: consume notifications center remote api (and expose mock version)
1 parent 355c449 commit 6fb8c8f

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export const NotificationsBellContainer = ({ popupView }: NotificationsCenterCon
4848
<NotificationsDropDown
4949
notifications={notifications}
5050
onMarkAllAsRead={() => markAsRead()}
51+
onMarkAsRead={(id: string) => markAsRead(id)}
5152
onViewAll={handleViewAll}
5253
popupView={popupView}
5354
/>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ import { Box, Flex } from '@input-output-hk/lace-ui-toolkit';
44

55
import { Button, NavigationButton } from '@lace/common';
66
import { SectionTitle } from '@components/Layout/SectionTitle';
7+
import { NotificationsTopic } from '@src/types/notifications-center';
78

89
import styles from './NotificationsCenter.module.scss';
910

1011
export interface NotificationsCenterProps {
1112
onBack: () => void;
1213
onMarkAllAsRead: () => void;
14+
onMarkAsRead: (id: string) => void;
1315
popupView?: boolean;
16+
topics: NotificationsTopic[];
17+
unreadNotifications: number;
1418
}
1519

1620
export const NotificationsCenter = ({

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { NotificationsCenter } from './NotificationsCenter';
1010
export const NotificationsCenterContainer = (): React.ReactElement => {
1111
const history = useHistory();
1212
const { walletUI } = useWalletStore();
13-
const { topics, notifications, markAsRead } = useNotificationsCenter();
13+
const { markAsRead, notifications, topics, unreadNotifications } = useNotificationsCenter();
1414

1515
// eslint-disable-next-line no-console
1616
console.log('topics', topics);
@@ -21,7 +21,10 @@ export const NotificationsCenterContainer = (): React.ReactElement => {
2121
<NotificationsCenter
2222
onBack={() => history.goBack()}
2323
onMarkAllAsRead={() => markAsRead()}
24+
onMarkAsRead={(id: string) => void markAsRead(id)}
2425
popupView={walletUI.appMode === APP_MODE_POPUP}
26+
topics={topics}
27+
unreadNotifications={unreadNotifications}
2528
/>
2629
);
2730
};

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import styles from './NotificationsDropDown.module.scss';
1212
export interface NotificationsDropDownProps {
1313
notifications: string[];
1414
onMarkAllAsRead: () => void;
15+
onMarkAsRead: (id: string) => void;
1516
onViewAll: () => void;
1617
popupView?: boolean;
1718
}

0 commit comments

Comments
 (0)