mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
Added PWA support (#40)
This commit is contained in:
@@ -24,6 +24,16 @@ export function useHabits() {
|
||||
})
|
||||
const target = habit.targetCompletions || 1
|
||||
|
||||
// Check if already completed
|
||||
if (completionsToday >= target) {
|
||||
toast({
|
||||
title: "Already completed",
|
||||
description: `You've already completed this habit today.`,
|
||||
variant: "destructive",
|
||||
})
|
||||
return null
|
||||
}
|
||||
|
||||
// Add new completion
|
||||
const updatedHabit = {
|
||||
...habit,
|
||||
|
||||
Reference in New Issue
Block a user