-
Notifications
You must be signed in to change notification settings - Fork 4
Mpilo fe #95
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: development
Are you sure you want to change the base?
Mpilo fe #95
Conversation
| this.handleChecked=this.handleChecked.bind(this); | ||
| this.Color=this.Color.bind(this) | ||
| } | ||
| onChange(e){ |
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.
Just add a space in between these function declarations and look a the scss file the indentations and empty lines spaces are inconsistent
URLs should be added to const variables and be kept in a const file
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.
I created constants file for product and in that file, there is const variable for url. I imported constants file on product and use the const variable for url instead of actual url.
| display: flex; | ||
| flex-grow: 10; | ||
| } | ||
| label { |
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.
Styling elements mean it will be applied to all elements of this type. This could make future development difficult rather make use of classes and or identifiers instead of styling an element directly
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.
I have changed the element to classsname for styling.
| <div className="col-12 marginTop10px"> | ||
| <label >Size</label> | ||
| </div> | ||
| <div className="col-12 marginTop10px"> |
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 correct way to name css class-names
marginTop10px
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.
yeah its bootstrap classes
| constructor(props){ | ||
| super(props); | ||
| this.state ={ | ||
| Name:'', |
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.
Keep a consistent naming convention.
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.
now my naming is consistent.
| .then(response=>response.json()); | ||
| } | ||
|
|
||
| Color() |
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.
Choose a specific style for your function declaration.
Color(){}
or
Color()
{
}
On top of it, avoid leaving an empty line between your parentheses and your curly brackets
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.
i have changed the style of function declaration to
color()
{
}
| { | ||
| if(this.state.color==false){ | ||
| this.setState({color:true}); | ||
| this.setState({ColourOption:1}) |
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.
You can set the state in the same 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.
this one is sorted now
| { | ||
| if(this.state.small==false) | ||
| { | ||
| this.setState({small:true}); |
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.
Set state in the same object
| <div className="col-12 cover-image"> | ||
| <label >Cover Image</label> | ||
| <span> | ||
| <input name="file" type="file" onChange={this.handleChage}/> |
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.
this.handleChage if you spelled it correctly is not visible in your constructor.
Please add it there.
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.
I removed handleChange function. now its sorted
laurent-mbuyu
left a comment
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 do apply the requested comments
No description provided.