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:
Kristin Aoki
2025-03-17 09:31:23 -04:00
committed by GitHub
parent 96d20e20e6
commit 964abbe0c3

View File

@@ -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)}