@@ -89,9 +89,9 @@ export default createStore({
89
89
let dailyStreakMultiplier : number ; //calculate the daily streak XP and score multiplier based on daily streak
90
90
let levelMultiplier : number ; //calculate the level score multiplier based on user level
91
91
let dayTasksMultiplier : number ; //calculate the XP and score multiplier based on tasks completed in a day (today)
92
- let tasksMultiplier : number ; //calculate the score multiplier based on total number of tasks completed
92
+ let tasksMultiplier : number ; //calculate the score multiplier based on the total number of tasks completed
93
93
let rankMultiplier : number ; //calculate the rank multiplier based on current user rating score
94
- let daysCompletedMultiplier : number ; //calculate the XP and score multiplier based on number of days completed
94
+ let daysCompletedMultiplier : number ; //calculate the XP and score multiplier based on the number of days completed
95
95
const activeTasks : number = state . tasks . filter (
96
96
( taskList ) => ! taskList . isCompleted ,
97
97
) . length ; //calculate the number of active tasks (tasks that are not completed) using Array.filter
@@ -581,7 +581,7 @@ export default createStore({
581
581
} else {
582
582
rankMultiplier = 71 ; //71 rank multiplier for rating from 1,000,000,000
583
583
}
584
- //calculate the multiplier based on number of days completed
584
+ //calculate the multiplier based on the number of days completed
585
585
if ( state . user . daysCompleted === 0 || state . user . daysCompleted === 1 ) {
586
586
daysCompletedMultiplier = 1 ; //1x days completed multiplier for 0 or 1 days completed
587
587
} else if ( state . user . daysCompleted < 3 ) {
@@ -696,7 +696,7 @@ export default createStore({
696
696
state . user . level = Math . max (
697
697
1 ,
698
698
Math . floor ( Math . cbrt ( state . user . xp + 0.5 ) ) ,
699
- ) ; //calculate the level based on how many XP and set level to 1 if total XP is 0
699
+ ) ; //calculate the level based on how many XP and set level to 1 if the total XP is 0
700
700
if ( state . user . level > userLevel ) {
701
701
alert (
702
702
`Level Up!\nYou are now level ${ state . user . level . toLocaleString ( "en-US" ) } !` ,
@@ -887,7 +887,7 @@ export default createStore({
887
887
) as boolean ; //ask user to confirm task deletion
888
888
}
889
889
if ( deleteTask || state . tasks [ index ] . isCompleted ) {
890
- //delete the task if one-time task is completed when the deleted button is clicked or when user confirms deletion alert
890
+ //delete the task if one-time task is completed when the deleted button is clicked or when the user confirms deletion alert
891
891
state . tasks . splice ( index , 1 ) ; //delete the task item
892
892
}
893
893
} ,
0 commit comments