Skip to content

Commit

Permalink
Improve page responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Sep 29, 2020
1 parent 69a6e62 commit ffe51a3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { EuiPanel, EuiResizableContainer } from '@elastic/eui';
import { FULL_HEIGHT } from '../RumDashboard';
import { PageLoadDistribution } from '../PageLoadDistribution';
import { PageViewsTrend } from '../PageViewsTrend';
import { usBreakPoints } from '../hooks/useBreakPoints';
import { useBreakPoints } from '../hooks/useBreakPoints';

export function PageLoadAndViews() {
const { isLarge } = usBreakPoints();
const { isLarge } = useBreakPoints();

return (
<EuiResizableContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { EuiPanel, EuiResizableContainer } from '@elastic/eui';
import { VisitorBreakdown } from '../VisitorBreakdown';
import { VisitorBreakdownMap } from '../VisitorBreakdownMap';
import { FULL_HEIGHT } from '../RumDashboard';
import { usBreakPoints } from '../hooks/useBreakPoints';
import { useBreakPoints } from '../hooks/useBreakPoints';

export function VisitorBreakdownsPanel() {
const { isLarge } = usBreakPoints();
const { isLarge } = useBreakPoints();

return (
<EuiResizableContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import { UXMetrics } from './UXMetrics';
import { ImpactfulMetrics } from './ImpactfulMetrics';
import { PageLoadAndViews } from './Panels/PageLoadAndViews';
import { VisitorBreakdownsPanel } from './Panels/VisitorBreakdowns';
import { usBreakPoints } from './hooks/useBreakPoints';
import { useBreakPoints } from './hooks/useBreakPoints';

export const FULL_HEIGHT = { height: '100%' };

export function RumDashboard() {
const { isLarge, isSmall } = usBreakPoints();
const { isLarge, isSmall } = useBreakPoints();

return (
<EuiFlexGroup direction={isSmall ? 'row' : 'column'} gutterSize="s">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import useWindowSize from 'react-use/lib/useWindowSize';
import useDebounce from 'react-use/lib/useDebounce';
import { isWithinMaxBreakpoint } from '@elastic/eui';

export function usBreakPoints() {
export function useBreakPoints() {
const [screenSizes, setScreenSizes] = useState({
isSmall: false,
isMedium: false,
Expand Down

0 comments on commit ffe51a3

Please sign in to comment.