grafana/public/app/features/dashboard/utils/screen.ts
juanicabanas c7419de2e5
PublicDashboard: Add RTK Query with loading and error state. Add MSW dependency for testing. (#55518)
PublicDashboard: Add RTK Query with loading and error state. Add MSW dependency for testing.
2022-09-22 09:35:04 -03:00

8 lines
144 B
TypeScript

import { useWindowSize } from 'react-use';
export const useIsDesktop = () => {
const { width } = useWindowSize();
return width > 1024;
};