Pregunta de entrevista de trivago

How would you rewrite/optimise this component? (Example given)