-
Notifications
You must be signed in to change notification settings - Fork 80
Refactor/116 RegistryInfoContent is converted to functional component #229
Refactor/116 RegistryInfoContent is converted to functional component #229
Conversation
Codecov Report
@@ Coverage Diff @@
## master #229 +/- ##
=========================================
+ Coverage 88.85% 88.9% +0.04%
=========================================
Files 139 139
Lines 915 919 +4
Branches 142 160 +18
=========================================
+ Hits 813 817 +4
+ Misses 91 87 -4
- Partials 11 15 +4
|
@priscilawebdev @juanpicado please review. |
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.
LGTM
src/components/RegistryInfoContent/RegistryInfoContent.test.tsx
Outdated
Show resolved
Hide resolved
src/components/RegistryInfoContent/RegistryInfoContent.test.tsx
Outdated
Show resolved
Hide resolved
@agar23 thank you very much for your contribution 🙂👏I would apply just a few minor changes ... please check my comments :-) |
np, I addressed most of the comments. but had a couple of questions/comments I left. |
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.
.
// TODO: move format license to API side. | ||
const license = formatLicense(pkg.license); | ||
const _license = formatLicense(license); |
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.
Please why did you add _
?
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.
we cant name this variable license
the props already have a prop named license
I presume this why the component was not destructuring the props before. this way we could call pkg.license
); | ||
} | ||
const RegistryInfoContent: React.FC<Props> = props => { | ||
const [tabPosition, setTabPosition] = useState<State['tabPosition']>(0); |
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.
const [tabPosition, setTabPosition] = useState<State['tabPosition']>(0); | |
const [tabPosition, setTabPosition] = useState(0); |
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.
as discussed I think it should be ok to be explicit here
@agar23 almost there :-) |
@agar23 great job, there are one conflict and seems linting is failing :) looking forward to merge it soon :) |
…tional_component' of github.com:agar23/ui into refactor/116_registry_info_content_is_converted_to_functional_component
…erted_to_functional_component
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.
great @agar23 🚀 🚀 🚀 🚀
Type: Refactor
The following has been addressed in the PR:
Description:
Refactor RegistryInfoContent compoenent to functional