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 9559a85
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/Avatar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ Avatar.defaultProps = {
className: null,
};


Check failure on line 42 in src/Avatar.jsx

View workflow job for this annotation

GitHub Actions / Release

More than 1 blank line not allowed
export default Avatar;
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 9559a85

Please sign in to comment.