-
Notifications
You must be signed in to change notification settings - Fork 9
fix(app-degree-pages): refactor defaultProps to use JS default params #1596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ const DEFAULT_GA_EVENT = { | |
| * @returns {JSX.Element} | ||
| */ | ||
|
|
||
| const Social = ({ social: { logoUrl, unitLogo, mediaLinks } }) => { | ||
| const Social = ({ social: { logoUrl, unitLogo = endorsedLogo, mediaLinks = {facebook: "", twitter: "", linkedIn: "", instagram: "", youtube: ""} } }) => { | ||
|
||
| return ( | ||
| <div className="wrapper" id="wrapper-endorsed-footer" data-testid="social"> | ||
| <div className="container" id="endorsed-footer"> | ||
|
|
@@ -166,17 +166,4 @@ Social.propTypes = { | |
| }), | ||
| }; | ||
|
|
||
| Social.defaultProps = { | ||
| social: { | ||
| unitLogo: endorsedLogo, | ||
| mediaLinks: { | ||
| facebook: "", | ||
| twitter: "", | ||
| linkedIn: "", | ||
| instagram: "", | ||
| youtube: "", | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| export { Social }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original
defaultPropsspecifieddisabled: false, but the new default isundefined. This changes the component behavior whendisabledis not provided. The default should befalseto maintain backward compatibility.