From 642be093c7341a65e35b8b6faf9261d5a2d6e726 Mon Sep 17 00:00:00 2001 From: Awais Ansari Date: Fri, 26 May 2023 20:52:18 +0500 Subject: [PATCH] fix: bell icon design change --- src/Header.jsx | 1 + src/Notifications/Notifications.jsx | 97 +++++++++++-------- .../AuthenticatedUserDropdown.jsx | 2 +- src/learning-header/LearningHeader.jsx | 33 +++---- 4 files changed, 72 insertions(+), 61 deletions(-) diff --git a/src/Header.jsx b/src/Header.jsx index 97c094e..c0db257 100644 --- a/src/Header.jsx +++ b/src/Header.jsx @@ -9,6 +9,7 @@ import { getConfig, subscribe, } from '@edx/frontend-platform'; + import DesktopHeader from './DesktopHeader'; import MobileHeader from './MobileHeader'; diff --git a/src/Notifications/Notifications.jsx b/src/Notifications/Notifications.jsx index a9f4ddc..76f1072 100644 --- a/src/Notifications/Notifications.jsx +++ b/src/Notifications/Notifications.jsx @@ -49,55 +49,68 @@ const Notifications = () => { }, []); return ( -
- -
- -

- {intl.formatMessage(messages.notificationTitle)} -

- -
- - - -
- + > +
+ +

+ {intl.formatMessage(messages.notificationTitle)} +

+ +
+ + + +
+ )} - > - <> - {notificationCounts?.Total > 0 && ( + > + <> + {/* {notificationCounts?.Total > 0 && ( {notificationCounts?.Total} - )} -
- { handleNotificationTray(!showNotificationTray); }} - src={NotificationsNone} - iconAs={Icon} - className="d-inline-block align-bottom ml-1 ml-n1 shadow-none bg-transparent text-primary-500" - /> -
- -
-
+ )} */} +
+ { handleNotificationTray(!showNotificationTray); }} + src={NotificationsNone} + iconAs={Icon} + variant="light" + iconClassNames="text-primary-500" + className="ml-4 mr-1 my-3" + style={{ width: '36px', height: '36px' }} + /> + + { notificationCounts?.Total > 0 && notificationCounts?.Total} + +
+ + ); }; diff --git a/src/learning-header/AuthenticatedUserDropdown.jsx b/src/learning-header/AuthenticatedUserDropdown.jsx index e48155f..a720516 100644 --- a/src/learning-header/AuthenticatedUserDropdown.jsx +++ b/src/learning-header/AuthenticatedUserDropdown.jsx @@ -22,7 +22,7 @@ const AuthenticatedUserDropdown = ({ intl, username }) => { <> {intl.formatMessage(messages.help)} - + diff --git a/src/learning-header/LearningHeader.jsx b/src/learning-header/LearningHeader.jsx index 7224d4d..32356f0 100644 --- a/src/learning-header/LearningHeader.jsx +++ b/src/learning-header/LearningHeader.jsx @@ -1,4 +1,4 @@ -import React, { useContext, useMemo } from 'react'; +import React, { useContext } from 'react'; import PropTypes from 'prop-types'; import { getConfig } from '@edx/frontend-platform'; import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; @@ -39,30 +39,27 @@ const LearningHeader = ({ alt={getConfig().SITE_NAME} /> ); - const value = useMemo(() => ({ authenticatedUser }), [authenticatedUser]); return ( - -
- {intl.formatMessage(messages.skipNavLink)} -
- {headerLogo} -
- {courseOrg} {courseNumber} - {courseTitle} -
- {showUserDropdown && authenticatedUser && ( +
+ {intl.formatMessage(messages.skipNavLink)} +
+ {headerLogo} +
+ {courseOrg} {courseNumber} + {courseTitle} +
+ {showUserDropdown && authenticatedUser && ( - )} - {showUserDropdown && !authenticatedUser && ( + )} + {showUserDropdown && !authenticatedUser && ( - )} -
-
- + )} +
+
); };