dev hax
This commit is contained in:
parent
1758907432
commit
01b93f7e03
@ -1,9 +1,10 @@
|
||||
const { connect } = require('react-redux');
|
||||
const preact = require('preact');
|
||||
const { Fragment } = require('preact');
|
||||
const actions = require('../actions');
|
||||
|
||||
const testGame = require('./../test.game');
|
||||
const testInstance = require('./../test.instance');
|
||||
const testGame = process.NODE_ENV === 'develop' && require('./../test.game');
|
||||
const testInstance = process.NODE_ENV === 'develop' && require('./../test.instance');
|
||||
|
||||
const addState = connect(
|
||||
function receiveState(state) {
|
||||
@ -84,6 +85,14 @@ function Nav(args) {
|
||||
return <button key={i} onClick={() => navTo('team')}>+</button>;
|
||||
});
|
||||
|
||||
const haxSection = process.NODE_ENV === 'development'
|
||||
? (<Fragment>
|
||||
<h2>Hax</h2>
|
||||
<button onClick={() => setTestGame(account.id)}>Test Game</button>
|
||||
<button onClick={() => setTestInstance(account.id)}>Test Instance</button>
|
||||
</Fragment>)
|
||||
: null;
|
||||
|
||||
return (
|
||||
<nav>
|
||||
<h2>Team</h2>
|
||||
@ -93,9 +102,7 @@ function Nav(args) {
|
||||
<button onClick={() => navTo('list')}>2. Join</button>
|
||||
<hr />
|
||||
{joined}
|
||||
<h2>Hax</h2>
|
||||
<button onClick={() => setTestGame(account.id)}>Test Game</button>
|
||||
<button onClick={() => setTestInstance(account.id)}>Test Instance</button>
|
||||
{haxSection}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user