-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
feat: Implement the utility section in Library. #320
Conversation
<RenderIf isTrue={activeTabName === 'utils'}> | ||
<Prismic repo="react-rainbow-utility"> | ||
<div className="react-rainbow-utils_container"> | ||
<QueryMulti component={Util} type="page-object"> |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
<QueryAt path="document.type" value="page-object" /> | ||
<QueryAt path="document.tags" value={[name]} /> | ||
</QueryMulti> | ||
<QueryMulti component={Util} type="tutorials"> |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
</QueryMulti> | ||
</div> | ||
<div className="react-rainbow-utils_container"> | ||
<QueryMulti component={Util} type="experience-examples"> |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
Pull Request Test Coverage Report for Build 1509
💛 - Coveralls |
import FlaskIcon from './flaskIcon'; | ||
import GraduationCapIcon from './graduationCapIcon'; | ||
|
||
export default function IntegrationCard({ results, type }) { |
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.
Function IntegrationCard
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
|
||
export default function ExperienceExampleCard({ results }) { | ||
return results.map(({ data, id }) => ( | ||
<div> |
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.
add key
<h1 className="react-rainbow-utils-text_header">Real experience examples</h1> | ||
<p className="react-rainbow-utils-text-description"> | ||
The Real experience examples will help you get | ||
started building your app using the Button 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.
using the Button Component?
here you need to use:
using the ${componentName} Component ...
but here this is not correctly because you are rendering this many times as the results length
</div> | ||
)}> | ||
<div className="react-rainbow-utils-item_img-container"> | ||
<img src={data.image.url} alt="" /> |
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.
use in the alt attribute the example name
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import ExperienceExampleCard from './experienceExampleCard'; | ||
import IntergrationCard from './intergrationCard'; |
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.
PageObjectCard
<a href={data.url.url} className="react-rainbow-utils-link"> | ||
<Card | ||
className="react-rainbow-utils-item" | ||
key={id} |
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.
put key in anchor element
<QueryAt path="document.type" value="page-object" /> | ||
<QueryAt path="document.tags" value={[name]} /> | ||
</QueryMulti> | ||
<QueryMulti component={Util} type="tutorials"> |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
<RenderIf isTrue={activeTabName === 'utils'}> | ||
<Prismic repo="rainbow-doc"> | ||
<div className="react-rainbow-utils_container"> | ||
<QueryMulti component={Util} type="page-object"> |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
import FlaskIcon from './flaskIcon'; | ||
import GraduationCapIcon from './graduationCapIcon'; | ||
|
||
export default function PageObjectCard({ results, type }) { |
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.
Function PageObjectCard
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Code Climate has analyzed commit 1888219 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
fixes #266