Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import styles, {app_red,app_pink} from '../Styles';
import * as utils from '../UtilFunctions';
import PlayerList from '../components/PlayerList';
import ResultList from '../components/ResultList';
import Button from '../components/Button';
import IconButton from '../components/IconButton';
import SafeImage from '../components/SafeImage';
import ListPicker from '../components/ListPicker';
import CalculatorInput from '../components/CalculatorInput';
import TutorialModal from '../components/TutorialModal';
import StatusBar from '../components/StatusBar';
import Pusher from 'pusher-js/react-native';
// Enable pusher logging - don't include this in production
Pusher.logToConsole = true;
var pusher = new Pusher(PUSHER_API_KEY, {
cluster: PUSHER_CLUSTER,
encrypted: true
});
export default class GameView extends Component {
constructor(props){
super(props);
const {navigation} = props;
const {user,game,token,showTutorial} = navigation.state.params;
const is_host = (game.host === user.id);
var channel = pusher.subscribe(game.identifier);
channel.bind('game-update', function(data) {