React Refactoring

The provided code is working, but it's ugly. Can you refactor it properly?
Let us know if you are interested to see more challenges in this category.

reactvarious