This component is used when a user registers and then again when a user is logged in and is updating their profile. The conception of this shared component began as an effort to keep things DRY since much of the functionality was shared. Since then however many switch statements have been added to the template as well as the class to make it work in both scenarios which have added to the complexity and has deteriorated understandability from the perspective of an outside developer which is of course not desirable.
Refactor this one shared component into two independent components. Shared functionality can be delegated to a shared service.
This component is used when a user registers and then again when a user is logged in and is updating their profile. The conception of this shared component began as an effort to keep things DRY since much of the functionality was shared. Since then however many switch statements have been added to the template as well as the class to make it work in both scenarios which have added to the complexity and has deteriorated understandability from the perspective of an outside developer which is of course not desirable.
Refactor this one shared component into two independent components. Shared functionality can be delegated to a shared service.