Canva interview question

Q: Find the bugs in the code and redesign the solution