isHomeAndMobile reactive
This commit is contained in:
parent
58c557ecb2
commit
7d5fe8f0ee
3 changed files with 7 additions and 7 deletions
|
|
@ -2,8 +2,8 @@ import isMobile from 'ismobilejs';
|
|||
import { isHome } from './location';
|
||||
|
||||
// https://github.com/ReactTraining/react-router/issues/184
|
||||
export const isHomeAndMobile = isHome() && isMobile.any;
|
||||
export const isNotHomeAndMobile = !isHomeAndMobile;
|
||||
export const isHomeAndMobile = () => isHome() && isMobile.any;
|
||||
export const isNotHomeAndMobile = () => !isHomeAndMobile();
|
||||
export const isAnyMobile = isMobile.any;
|
||||
// https://stackoverflow.com/questions/18625321/detect-webkit-browser-in-javascript
|
||||
export const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue