umami events

This commit is contained in:
NIJAT
2025-12-27 16:21:06 +04:00
parent 0b54311f42
commit 4f0949b059
4 changed files with 160 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import { useState } from "react"
import { Moon, Sun } from "lucide-react"
import { cn } from "@/lib/utils"
import { useTheme } from "@/hooks/use-theme"
import { analytics } from "@/lib/analytics"
interface ThemeToggleProps {
className?: string
@@ -25,7 +26,10 @@ export function ThemeToggle({ className }: ThemeToggleProps) {
"bg-[var(--bg-secondary)] border border-[var(--border-primary)]",
className
)}
onClick={toggle}
onClick={() => {
toggle();
analytics.themeChanged(isDark ? 'light' : 'dark');
}}
role="button"
tabIndex={0}
>