import { useRef } from "react";
import { useSize } from 'ahooks';
export function useSizeHook() {
  const ref = useRef<HTMLDivElement>(null);
  const size = useSize(ref);

  return {
    size: {
      width: size?.width || 0,
      height: size?.height || 0
    },
    ref
  }
}