warsawjs / topics-manager

App for choosing subjects and signing up as trainers for workshops
MIT License
10 stars 1 forks source link

Feature/disable actions/buttons for anonymous users #31

Closed kgajowy closed 6 years ago

kgajowy commented 6 years ago

image

image

kgajowy commented 6 years ago

@Tuhaj I have refactored it a bit... they still have a few lines that looks similar (due to actions & dispatch) but there is nothing more to truly move around. An option would be to move user& mapStateToProps to new JoinWorkshopContainer but it would require strange passing of alreadyAttending={topic.amIAttending(user)} in a weird way (i.e. which function should be called on topic) and move the topic down as well then, all 3 components would look like much better, however it would have more cons than the current solution:

thus, I decided to keep it as commited