This commit is contained in:
@@ -70,6 +70,11 @@ export function previousHabitSwipeValue(kind: string | undefined, current: numbe
|
||||
return 0
|
||||
}
|
||||
|
||||
export function habitButtonValue(kind: string | undefined, current: number | boolean | undefined, target = 1) {
|
||||
if (isHabitComplete(kind, current, target)) return 0
|
||||
return nextHabitSwipeValue(kind, current, target)
|
||||
}
|
||||
|
||||
export function numericHabitInputValue(input: number | string | undefined) {
|
||||
if (input === undefined || input === '') return null
|
||||
const value = Number(input)
|
||||
|
||||
Reference in New Issue
Block a user