"use client"; import { useEffect } from "react"; import { useTheme } from "@/hooks/useTheme"; export function ThemeInitializer() { // Calling the hook applies the persisted theme and mode, and subscribes // the document to system light/dark changes. useTheme(); useEffect(() => { document.documentElement.setAttribute("data-ready", "true"); }, []); return null; }