fix: right sidebar icon behavior (#1636)
When using the right new-sidebar with the left sidebar navigation, the icon for the right sidebar changed whenever the left sidebar was open. The icon change is supposed to indicate to users that the right sidebar is open. It is confusing to users when the left sidebar navigation is open and the right sidebar icon is filled instead of outlined.
This commit is contained in:
@@ -36,6 +36,8 @@ const DiscussionsNotificationsTrigger = ({ onClick }) => {
|
||||
[tabs],
|
||||
);
|
||||
|
||||
const sidebarIcon = currentSidebar === ID ? RightSidebarFilled : RightSidebarOutlined;
|
||||
|
||||
useEffect(() => {
|
||||
if (baseUrl && edxProvider) {
|
||||
dispatch(getCourseDiscussionTopics(courseId));
|
||||
@@ -81,7 +83,7 @@ const DiscussionsNotificationsTrigger = ({ onClick }) => {
|
||||
|
||||
return (
|
||||
<IconButton
|
||||
src={currentSidebar ? RightSidebarFilled : RightSidebarOutlined}
|
||||
src={sidebarIcon}
|
||||
iconAs={Icon}
|
||||
onClick={handleClick}
|
||||
alt={intl.formatMessage(messages.openSidebarTrigger)}
|
||||
|
||||
Reference in New Issue
Block a user