Pergunta de entrevista da empresa ServiceTitan

Given React boilerplate code, fix and optimize the code