import { useRef } from 'react'; export function useClientOnce(callback: () => void): void { const canCall = useRef(true); if (typeof window !== 'undefined' && canCall.current) { canCall.current = false; callback(); } }