GreenUp allows users to incorporate more environmentally friendly activities into their daily lives, while engaging in friendly competition with other users.
As a user, when I am on my 'My Activities' page, I would like to see a summary at the top of the page with my overall points, my points so far this week, and the highest weekly score I've ever achieved. I would also like to see a list of my activities from most recent to least recent.
Development
Create a 'UserActivities' component in a UserActivities.js file
Inside the UserActivities component, set state of userActivities to an empty array
Create a function called getUserActivities that passes in the current uid and, in a promise, the .then will set the state of userActivities equal to userActivities `({ userActivities })
Create a componentDidMount function that calls the function this.getUserActivities
Inside the render, create a function called createUserActivityCards that maps over the userActivities in state, and puts them all inside their own UserActivityCard component
In the return, create the divs and headers that you would like to place the ActivityCards into
User Story
As a user, when I am on my 'My Activities' page, I would like to see a summary at the top of the page with my overall points, my points so far this week, and the highest weekly score I've ever achieved. I would also like to see a list of my activities from most recent to least recent.
Development