-
Notifications
You must be signed in to change notification settings - Fork 4
added a volunteering functionality #89
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?
Conversation
| </div> | ||
| </div> | ||
| </div> | ||
| // <div className="col-12 Bookcard"> |
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 a TODO if you will use it in the future
| this.getCountryCode( countries[countryCode]); | ||
| } | ||
|
|
||
| getCountryCode(country) { |
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 wrap your method inside the componentDidMount function to ensure that the component is done mounting to the ReactDOM
|
|
||
|
|
||
|
|
||
| componentWillMount() { |
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.
There is a controversy regarding the call of fetch method in the componentWillMount.
One thing remains, your call is an asynchronous call that will only return when the render happens or later.
Your rendering won't be able to be paused waiting for the data to be displayed.
With this method you have better chances for your component to be empty first up until your data is rendered.
Since you have chosen this path, find a suitable way to grey out the field that are waiting to display data.
Else, you can use the componentDidMount
| .then((response) => response.json()) | ||
| .then( | ||
| (data) => { | ||
| console.log(data); |
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.
Remove the console
| }) | ||
| }, | ||
| (error) => { | ||
| console.log(error); |
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.
Remove the console if you have more before pushing them
| @@ -0,0 +1,9 @@ | |||
| .btn-volunteer-title{ | |||
| border-radius: 100px !important; | |||
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 usage of !important has been preached to your peers.
Do not make use of it unless it is your last option
| .then((response) => response.json()) | ||
| .then( | ||
| (data) => { | ||
| console.log(data); |
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.
Remove the console
| console.log(data); | ||
| this.projects = data.map((item) => { | ||
|
|
||
| return ( |
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.
What are you returning?
added a volunteering functionality