Skip to content

Commit 52f7bd0

Browse files
committed
feat: Header - Focus order meaning - Open Edx Demo Course
1 parent 6b98d10 commit 52f7bd0

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/learning-header/LearningHeader.jsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const LearningHeader = ({
1717
courseOrg, courseNumber, courseTitle, intl, showUserDropdown,
1818
}) => {
1919
const { authenticatedUser } = useContext(AppContext);
20+
const isMobile = window.matchMedia('(max-width: 768px)').matches;
2021

2122
const headerLogo = (
2223
<LogoSlot
@@ -30,6 +31,11 @@ const LearningHeader = ({
3031
<header className="learning-header customise indigo-header-version">
3132
<a className="sr-only sr-only-focusable" href="#main-content">{intl.formatMessage(messages.skipNavLink)}</a>
3233
<div className="container-xl py-2 d-flex align-items-center">
34+
{showUserDropdown && authenticatedUser && isMobile && (
35+
<AuthenticatedUserDropdown
36+
username={authenticatedUser.username}
37+
/>
38+
)}
3339
{headerLogo}
3440
<div className="flex-grow-1 course-title-lockup d-flex" style={{ lineHeight: 1 }}>
3541
<CourseInfoSlot courseOrg={courseOrg} courseNumber={courseNumber} courseTitle={courseTitle} />
@@ -48,9 +54,13 @@ const LearningHeader = ({
4854
{showUserDropdown && authenticatedUser && (
4955
<>
5056
<LearningHelpSlot />
51-
<AuthenticatedUserDropdown
52-
username={authenticatedUser.username}
53-
/>
57+
{
58+
!isMobile && (
59+
<AuthenticatedUserDropdown
60+
username={authenticatedUser.username}
61+
/>
62+
)
63+
}
5464
</>
5565
)}
5666
{showUserDropdown && !authenticatedUser && (

0 commit comments

Comments
 (0)