"use client" import React from "react" import { useDimensions } from "./useDimensions" export const useIsOverflowed = ( ref: React.RefObject, ) => { const { height, width } = useDimensions(ref) if (!ref.current) { return false } const { scrollHeight, scrollWidth } = ref.current return scrollHeight > height + 1 || scrollWidth > width + 1 }