Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Route, Switch } from 'react-router-dom';
import util from 'peerjs/lib/util';
import * as p2pActions from '../redux/p2p/p2pActionCreators';
import '../assets/styles/index.scss';
import Header from './Header';
import Game from './Game';
import Incompatible from './Incompatible';
import Help from './Help';
import Home from './Home';
import About from './About';
class App extends React.Component {
state = {
compatible: util.browser === 'Firefox',
};
componentDidMount() {
if (this.state.compatible) {
this.props.p2pInitialize();
}
}
render() {
let display;
if (this.state.compatible) {
display = ;
} else {
display = ;
}