Support robust theme sync with resolvedTheme and parent check loop

This commit is contained in:
2026-07-10 16:41:22 +05:30
parent 31ef5cf024
commit 0d6e0b83ac
3 changed files with 52 additions and 22 deletions

View File

@@ -8,7 +8,7 @@ import { useTheme } from "next-themes";
export function StreakOnboardingModal() {
const { user, loading } = useActiveUser();
const { theme } = useTheme();
const { resolvedTheme } = useTheme();
const [isOpen, setIsOpen] = useState(false);
useEffect(() => {
@@ -68,7 +68,7 @@ export function StreakOnboardingModal() {
{/* Top Celebration Animation Panel (Iframe with height 60%, matching bg) */}
<div className="relative w-full h-[60%] z-10 pointer-events-none overflow-hidden bg-background">
<iframe
src={`/streak-animation.html?streak=${streak}&theme=${theme === 'light' ? 'light' : 'dark'}`}
src={`/streak-animation.html?streak=${streak}&theme=${resolvedTheme === 'light' ? 'light' : 'dark'}`}
className="w-full h-full border-none"
title="Streak Celebration"
allowtransparency="true"