mirror of
https://github.com/nagaoo0/HabbitGrid.git
synced 2026-01-11 23:44:55 +00:00
Add counter animations
This commit is contained in:
@@ -5,6 +5,7 @@ import { Plus, Settings, TrendingUp, Flame, Calendar, Moon, Sun } from 'lucide-r
|
||||
import { Button } from '../components/ui/button';
|
||||
import { useToast } from '../components/ui/use-toast';
|
||||
import HabitCard from '../components/HabitCard';
|
||||
import AnimatedCounter from '../components/AnimatedCounter';
|
||||
import GitActivityGrid from '../components/GitActivityGrid';
|
||||
import { getGitEnabled } from '../lib/git';
|
||||
import { getHabits } from '../lib/storage';
|
||||
@@ -111,7 +112,7 @@ const HomePage = () => {
|
||||
<span className="text-xs font-medium text-muted-foreground">Total Streaks</span>
|
||||
</div>
|
||||
<p className="text-2xl font-bold">
|
||||
{habits.reduce((sum, h) => sum + (h.currentStreak || 0), 0)}
|
||||
<AnimatedCounter value={habits.reduce((sum, h) => sum + (h.currentStreak || 0), 0)} duration={900} />
|
||||
</p>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user