blob: 55792c6906d09a3be89e474f5636b5800f3632ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App.jsx';
const is_iphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))
const is_ipad = (navigator.userAgent.match(/iPad/i))
const is_android = (navigator.userAgent.match(/Android/i))
const is_mobile = is_iphone || is_ipad || is_android
const is_desktop = ! is_mobile
document.body.classList.add(is_desktop ? 'desktop' : 'mobile')
ReactDOM.render(<App />, document.getElementById('container'));
|