I have this piece of code that I think could be simpler, right now I\'m creating an object and asigning the properties in both conditions of the if
handleSubm