I'm trying to check if the height of my button is 50 to display a different spinner but even the height being 50 displays SpinnerTwo, does anyone know the problem?
const refButton = useRef<HTMLButtonElement | null>(null); <Button ref={refButton} onClick={onClick} > {ref.current?.clientHeight === 50 ? <SpinnerOne /> : <SpinnerTwo />}</Button>