import { useContext } from 'react';

import { PageContext } from './use-page-context';

const usePlatform = () => {
  const { platform } = useContext(PageContext);

  return { isMobile: platform === 'mobile', platform };
};

export default usePlatform;
