Merge branch 'master' of ssh://cryps.gg:40022/~/cryps
This commit is contained in:
@@ -47,7 +47,7 @@ function Main(props) {
|
||||
if (nav === 'list') return <List />;
|
||||
|
||||
return (
|
||||
<Team />
|
||||
<main></main>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,12 @@ const addState = connect(
|
||||
instances,
|
||||
team,
|
||||
cryps,
|
||||
game,
|
||||
} = state;
|
||||
|
||||
function sendInstanceState(instance) {
|
||||
ws.clearGameStateTimeout();
|
||||
ws.clearInstanceStateTimeout();
|
||||
return ws.sendInstanceState(instance.id);
|
||||
}
|
||||
|
||||
@@ -24,6 +27,7 @@ const addState = connect(
|
||||
instances,
|
||||
team,
|
||||
cryps,
|
||||
game,
|
||||
sendInstanceState,
|
||||
};
|
||||
},
|
||||
@@ -57,14 +61,21 @@ function Nav(args) {
|
||||
team,
|
||||
cryps,
|
||||
instances,
|
||||
game,
|
||||
|
||||
navTo,
|
||||
setTestGame,
|
||||
setTestInstance,
|
||||
} = args;
|
||||
|
||||
function joinInstance(i) {
|
||||
if (game) navTo(null);
|
||||
sendInstanceState(i);
|
||||
return true;
|
||||
}
|
||||
|
||||
const joined = instances.map(i => (
|
||||
<button key={i.id} onClick={() => sendInstanceState(i)} >{i.name}</button>
|
||||
<button key={i.id} onClick={() => joinInstance(i)} >{i.name}</button>
|
||||
));
|
||||
|
||||
const teamElements = team.map((c, i) => {
|
||||
|
||||
@@ -101,6 +101,7 @@ function registerEvents(store) {
|
||||
|
||||
function setAccount(account) {
|
||||
store.dispatch(actions.setAccount(account));
|
||||
store.dispatch(actions.setNav('team'));
|
||||
}
|
||||
|
||||
function clearCombiner() {
|
||||
|
||||
Reference in New Issue
Block a user