Skip to content

Commit a9112f5

Browse files
Notifications Popup Fixes
Challenge: 30115261 Submission: 351307
1 parent 4574f37 commit a9112f5

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

__tests__/shared/containers/__snapshots__/TopcoderHeader.jsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ exports[`Matches shallow snapshot 1`] = `
55
closeMenu={[Function]}
66
closeMobileMenu={[Function]}
77
closeSearch={[Function]}
8+
dismissChallengeNotifications={[Function]}
89
loadNotifications={[Function]}
910
markAllNotificationAsRead={[Function]}
1011
markAllNotificationAsSeen={[Function]}

src/shared/components/Header/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ try {
1818

1919
const Header = ({
2020
profile, notifications, loadNotifications, markNotificationAsRead, markAllNotificationAsRead,
21-
markAllNotificationAsSeen,
21+
markAllNotificationAsSeen, dismissChallengeNotifications,
2222
}) => {
2323
const [activeLevel1Id, setActiveLevel1Id] = useState();
2424
const [path, setPath] = useState();
@@ -65,6 +65,7 @@ const Header = ({
6565
markNotificationAsRead={markNotificationAsRead}
6666
markAllNotificationAsRead={markAllNotificationAsRead}
6767
markAllNotificationAsSeen={markAllNotificationAsSeen}
68+
dismissChallengeNotifications={dismissChallengeNotifications}
6869
accountMenu={config.ACCOUNT_MENU}
6970
switchText={config.ACCOUNT_MENU_SWITCH_TEXT}
7071
onSwitch={handleSwitchMenu}
@@ -105,6 +106,7 @@ Header.propTypes = {
105106
markNotificationAsRead: PT.func.isRequired,
106107
markAllNotificationAsRead: PT.func.isRequired,
107108
markAllNotificationAsSeen: PT.func.isRequired,
109+
dismissChallengeNotifications: PT.func.isRequired,
108110
};
109111

110112
export default Header;

src/shared/containers/TopcoderHeader.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ function mapDispatchToProps(dispatch) {
2929
dispatch(actions.notifications.markAllNotificationAsSeenInit());
3030
dispatch(actions.notifications.markAllNotificationAsSeenDone());
3131
},
32+
dismissChallengeNotifications: (challegeId) => {
33+
dispatch(actions.notifications.dismissChallengeNotificationsInit());
34+
dispatch(actions.notifications.dismissChallengeNotificationsDone(challegeId));
35+
},
3236
};
3337
}
3438
export default connect(

0 commit comments

Comments
 (0)