- Add recurring activities feature (daily, weekly, monthly) - Auto-join with guest count for recurring series - Parent-child relationship for recurring instances - 'Opakovaná' badge and upcoming instances section - Smart delete logic (promote first child to parent) - My Activities page with created/joined tabs - Map view at /venues with activity markers - Custom sport icons and user location marker - InfoWindow with activity details - Navigation renamed 'Športoviská' to 'Mapa aktivít' - Fix participation tracking for joined activities - Database migrations for recurring and guest count fields
35 lines
831 B
TypeScript
35 lines
831 B
TypeScript
'use client';
|
|
|
|
import { useState, useEffect } from 'react';
|
|
import { useTheme } from '@/contexts/ThemeContext';
|
|
import { Moon, Sun } from 'lucide-react';
|
|
|
|
export function ThemeToggle() {
|
|
const { theme, toggleTheme } = useTheme();
|
|
const [mounted, setMounted] = useState(false);
|
|
|
|
useEffect(() => {
|
|
setMounted(true);
|
|
}, []);
|
|
|
|
if (!mounted) {
|
|
return (
|
|
<div className="p-2 rounded-lg acrylic w-9 h-9" />
|
|
);
|
|
}
|
|
|
|
return (
|
|
<button
|
|
onClick={toggleTheme}
|
|
className="p-2 rounded-lg acrylic hover-glow reveal-effect transition-all cursor-pointer"
|
|
aria-label="Prepnúť tému"
|
|
>
|
|
{theme === 'light' ? (
|
|
<Moon className="w-5 h-5 text-[color:var(--fluent-text)]" />
|
|
) : (
|
|
<Sun className="w-5 h-5 text-[color:var(--fluent-text)]" />
|
|
)}
|
|
</button>
|
|
);
|
|
}
|