rename battle -> game
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
const preact = require('preact');
|
||||
|
||||
function CrypPanel({ battle }) {
|
||||
if (!battle) return <div>...</div>;
|
||||
return (
|
||||
<div>{JSON.stringify(battle)}</div>
|
||||
)
|
||||
// return (
|
||||
// <div className="">
|
||||
// <div>{JSON.stringify(battle.a)}</div>
|
||||
// <div>{JSON.stringify(battle.b)}</div>
|
||||
// <div>
|
||||
// {battle.log.map((l, i) => (<p key={i} >{l}</p>))}
|
||||
// </div>
|
||||
// </div>
|
||||
// );
|
||||
}
|
||||
|
||||
module.exports = CrypPanel;
|
||||
@@ -4,7 +4,7 @@ const preact = require('preact');
|
||||
const ItemListContainer = require('./item.list.container');
|
||||
const CrypSpawnContainer = require('./cryp.spawn.container');
|
||||
const CrypListContainer = require('./cryp.list.container');
|
||||
const BattleContainer = require('./battle.container');
|
||||
const GameContainer = require('./game.container');
|
||||
|
||||
function renderBody() {
|
||||
return (
|
||||
@@ -25,7 +25,7 @@ function renderBody() {
|
||||
</div>
|
||||
</div>
|
||||
<div className="column">
|
||||
<BattleContainer />
|
||||
<GameContainer />
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
const { connect } = require('preact-redux');
|
||||
|
||||
const Battle = require('./battle');
|
||||
const Game = require('./game');
|
||||
|
||||
const addState = connect(
|
||||
function receiveState(state) {
|
||||
const { battle } = state;
|
||||
const { game } = state;
|
||||
// function sendCombatPve(crypId) {
|
||||
// return ws.sendCombatPve(crypId);
|
||||
// }
|
||||
|
||||
return { battle };
|
||||
return { game };
|
||||
}
|
||||
);
|
||||
|
||||
module.exports = addState(Battle);
|
||||
module.exports = addState(Game);
|
||||
@@ -0,0 +1,19 @@
|
||||
const preact = require('preact');
|
||||
|
||||
function GamePanel({ game }) {
|
||||
if (!game) return <div>...</div>;
|
||||
return (
|
||||
<div>{JSON.stringify(game)}</div>
|
||||
)
|
||||
// return (
|
||||
// <div className="">
|
||||
// <div>{JSON.stringify(game.a)}</div>
|
||||
// <div>{JSON.stringify(game.b)}</div>
|
||||
// <div>
|
||||
// {game.log.map((l, i) => (<p key={i} >{l}</p>))}
|
||||
// </div>
|
||||
// </div>
|
||||
// );
|
||||
}
|
||||
|
||||
module.exports = GamePanel;
|
||||
Reference in New Issue
Block a user