Remove isTouch
from use-screensize.js
-- it's not an effect
It will be confusing for the next person to look at the effects folder for `isTouch`. Use `platform.isTouch()` instead.
This commit is contained in:
parent
49db1fe83b
commit
934f627c19
2 changed files with 3 additions and 6 deletions
|
@ -13,12 +13,13 @@ import NotificationBubble from 'component/notificationBubble';
|
||||||
import DebouncedInput from 'component/common/debounced-input';
|
import DebouncedInput from 'component/common/debounced-input';
|
||||||
import I18nMessage from 'component/i18nMessage';
|
import I18nMessage from 'component/i18nMessage';
|
||||||
import ChannelThumbnail from 'component/channelThumbnail';
|
import ChannelThumbnail from 'component/channelThumbnail';
|
||||||
import { useIsMobile, useIsLargeScreen, isTouch } from 'effects/use-screensize';
|
import { useIsMobile, useIsLargeScreen } from 'effects/use-screensize';
|
||||||
import { GetLinksData } from 'util/buildHomepage';
|
import { GetLinksData } from 'util/buildHomepage';
|
||||||
|
import { platform } from 'util/platform';
|
||||||
import { DOMAIN, ENABLE_UI_NOTIFICATIONS, ENABLE_NO_SOURCE_CLAIMS } from 'config';
|
import { DOMAIN, ENABLE_UI_NOTIFICATIONS, ENABLE_NO_SOURCE_CLAIMS } from 'config';
|
||||||
import PremiumBadge from 'component/common/premium-badge';
|
import PremiumBadge from 'component/common/premium-badge';
|
||||||
|
|
||||||
const touch = isTouch();
|
const touch = platform.isTouch();
|
||||||
|
|
||||||
type SideNavLink = {
|
type SideNavLink = {
|
||||||
title: string,
|
title: string,
|
||||||
|
|
|
@ -91,7 +91,3 @@ export function useIsMediumScreen() {
|
||||||
export function useIsLargeScreen() {
|
export function useIsLargeScreen() {
|
||||||
return useHasWindowWidthChangedEnough((windowSize) => windowSize > 1600);
|
return useHasWindowWidthChangedEnough((windowSize) => windowSize > 1600);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isTouch() {
|
|
||||||
return 'ontouchstart' in window || 'onmsgesturechange' in window;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue