'use client' import { useEffect, useRef } from 'react' export function ClientButton({ children, onClick, ...props }: { children?: React.ReactNode; onClick?: string } & React.ButtonHTMLAttributes) { const btnRef = useRef(null) useEffect(() => { if (typeof onClick === 'string' && btnRef.current) { btnRef.current.onclick = onClick as any } }, [onClick]) return ( ) }