import { Grid } from "antd";

const { useBreakpoint } = Grid;

export default function useBreakPoint() {
  const { sm, md, lg, xl, xxl } = useBreakpoint();
  if (lg || xl || xxl)
    return {
      isDesktop: true,
      isMobile: false,
      isTablet: false,
    };
  if (md || sm)
    return {
      isDesktop: false,
      isMobile: false,
      isTablet: true,
    };
  return {
    isDesktop: false,
    isMobile: true,
    isTablet: false,
  };
}
