Skip to content

Commit

Permalink
Merge pull request #22 from edly-io/chore/remove_course_name_from_header
Browse files Browse the repository at this point in the history
fix: remove course name from from header
  • Loading branch information
HammadYousaf01 committed Oct 23, 2024
2 parents 17563db + b5501a9 commit e698ebd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
7 changes: 1 addition & 6 deletions src/learning-header/LearningHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ LinkedLogo.propTypes = {
};

const LearningHeader = ({
courseOrg, courseNumber, courseTitle, intl, showUserDropdown, userProfileImage,
courseTitle, intl, showUserDropdown, userProfileImage,
}) => {
const { authenticatedUser } = useContext(AppContext);

Expand All @@ -45,7 +45,6 @@ const LearningHeader = ({
<div className="container-xl d-flex align-items-center">
{headerLogo}
<div className="flex-grow-1 course-title-lockup" style={{ lineHeight: 1 }}>
<span className="d-block small m-0">{courseOrg} {courseNumber}</span>
<span className="d-block m-0 font-weight-bold course-title">{courseTitle}</span>
</div>
{showUserDropdown && authenticatedUser && (
Expand All @@ -63,17 +62,13 @@ const LearningHeader = ({
};

LearningHeader.propTypes = {
courseOrg: PropTypes.string,
courseNumber: PropTypes.string,
courseTitle: PropTypes.string,
userProfileImage: PropTypes.string,
intl: intlShape.isRequired,
showUserDropdown: PropTypes.bool,
};

LearningHeader.defaultProps = {
courseOrg: null,
courseNumber: null,
courseTitle: null,
userProfileImage: null,
showUserDropdown: true,
Expand Down
3 changes: 0 additions & 3 deletions src/learning-header/LearningHeader.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ describe('Header', () => {

it('displays course data', () => {
const courseData = {
courseOrg: 'course-org',
courseNumber: 'course-number',
courseTitle: 'course-title',
};
render(<Header {...courseData} />);

expect(screen.getByText(`${courseData.courseOrg} ${courseData.courseNumber}`)).toBeInTheDocument();
expect(screen.getByText(courseData.courseTitle)).toBeInTheDocument();
});
});

0 comments on commit e698ebd

Please sign in to comment.