Moved destructuring code to different component.