Added PWA support (#40)

This commit is contained in:
Doh
2025-01-15 20:07:23 -05:00
committed by GitHub
parent 1bb968b7c1
commit 71b9d1b408
32 changed files with 1274 additions and 312 deletions

View File

@@ -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,