-
Notifications
You must be signed in to change notification settings - Fork 0
Streaks and Dynamic XP #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for bog-ican ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Disclaimer: This comment was AI-generated and is not necessarily completely accurate. Please take code comments with a grain of salt. Greptile Summary
Confidence Score: 3/5
Important Files Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
15 files reviewed, 1 comment
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
rgodha24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
i think we are gonna have a bit more of a longer conversation abt what to do with streaks and maybe push implementation to next semester? |
|
|
||
| await PetDAO.updatePetByUserId(userId, { | ||
| food: existingPet.food + FOOD_INC, | ||
| coins: existingPet.coins + streakUpdate.coinsAwarded + 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the +10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the tutorial gave +10 coins after the user logged the practice medication so i applied the same logic to the regular functionality
| CHEAP = 10, | ||
| MEDIUM = 25, | ||
| EXPENSIVE = 50, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to talk abt this too
also, typescript enums are kinda an antipattern
| export const calculateXPForLevel = (level: number): number => { | ||
| return 90 + level * 10; | ||
| }; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i feel like this doesnt rly need to be a helper
bet |


Solo Leveling the Leveling System
Issue Number(s): #157
What does this PR change and why?
Added backend functionality for streaks and dynamic xp reqs for each level. Not much was implemented on the frontend since this was a BE ticket but i did add info about the current streak and stuff like that on the store page.
Checklist
Critical Changes
Related PRs
Testing
Enumerate steps to test the functionality of your ticket. This should include edge cases and testing of error handling, if applicable.