Akinox interview question

React component to fix. Code already present