hackalog-frontend
hackalog-frontend copied to clipboard
Add Projects tab to the Profile page
After #89 is completed, we can add a "Projects" tab to the Profile page. The main purpose of this tab will be to show the submissions done by all the teams the user is a part of. Currently, this is not shown; instead, we can only see the user teams on the profile page.
Tasks
- [ ] Investigate if submissions can be extracted from the existing data on the Profile page. Possible sources of this data are:
- Profile data stored in the Context in context/auth.js
- Data fetched on the profile page from the backend API
/profile/{username}. - Other APIs in the backend can be explored.
- [ ] If no such sources are found, or the sources are computationally expensive, file an issue on the backend repository, mentioning this issue, for a new API to get the submission data of the user.
- [ ] Make a card for showing Projects. (If a component is already there, skip this step)
- [ ] Fetch the submission data from this source and show the data in cards.
I guess we can fetch submission data from backend API, from /profile/{username} we get teams id's and Hackathons for every team user is part of, then we get submission id from /hackathons/{slug}/submissions/.
Instead of card, I'm thinking about table which contain user Team Name, Hackathon, rank, Score and Submission link.
I guess we can fetch submission data from backend API, from /profile/{username} we get teams id's and Hackathons for every team user is part of, then we get submission id from /hackathons/{slug}/submissions/.
Instead of card, I'm thinking about table which contain user Team Name, Hackathon, rank, Score and Submission link.
Card will be better since there won't be too many hackathons to display and also cards would look good.
I guess we can fetch submission data from backend API, from /profile/{username} we get teams id's and Hackathons for every team user is part of, then we get submission id from /hackathons/{slug}/submissions/.
Yes, correct. Till this request is being processed, we need to show a spinner instead of an empty tab for better UI.