fix team page
This commit is contained in:
parent
fedc52b558
commit
a024520d38
@ -349,18 +349,35 @@ header {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
.menu-cryps {
|
.menu-cryps {
|
||||||
display: flex;
|
display: grid;
|
||||||
flex-flow: row wrap;
|
grid-auto-columns: 1fr 1fr 1fr;
|
||||||
|
grid-auto-rows: min-content 1fr;
|
||||||
|
|
||||||
|
grid-template-areas:
|
||||||
|
"top"
|
||||||
|
"list";
|
||||||
|
/* flex-flow: row wrap;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-cryps .list {
|
||||||
|
grid-area: list;
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-cryp-ctr {
|
.menu-cryp-ctr {
|
||||||
flex: 0 0 30%;
|
/*flex: 0 0 30%;*/
|
||||||
flex-flow: column;
|
|
||||||
|
|
||||||
text-align: center;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-flow: column;
|
||||||
|
text-align: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -36,8 +36,16 @@ const addState = connect(
|
|||||||
dispatch(actions.setTeam(crypIds));
|
dispatch(actions.setTeam(crypIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function navToList() {
|
||||||
|
dispatch(actions.setGame(null));
|
||||||
|
dispatch(actions.setInstance(null));
|
||||||
|
return dispatch(actions.setNav('list'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setTeam,
|
setTeam,
|
||||||
|
navToList,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -50,6 +58,7 @@ function Team(args) {
|
|||||||
|
|
||||||
setTeam,
|
setTeam,
|
||||||
sendCrypSpawn,
|
sendCrypSpawn,
|
||||||
|
navToList,
|
||||||
} = args;
|
} = args;
|
||||||
|
|
||||||
if (!cryps) return <div></div>;
|
if (!cryps) return <div></div>;
|
||||||
@ -97,10 +106,25 @@ function Team(args) {
|
|||||||
const spawnButtons = range(spawnButtonsNum)
|
const spawnButtons = range(spawnButtonsNum)
|
||||||
.map(i => <SpawnButton key={i} i={i} spawn={name => sendCrypSpawn(name)} />);
|
.map(i => <SpawnButton key={i} i={i} spawn={name => sendCrypSpawn(name)} />);
|
||||||
|
|
||||||
|
|
||||||
|
const header = (
|
||||||
|
<div className="top">
|
||||||
|
<button
|
||||||
|
disabled={cryps.every(c => c)}
|
||||||
|
className="instance-btn instance-ui-btn right"
|
||||||
|
onClick={() => navToList()}>
|
||||||
|
Join an Instance
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="menu-cryps">
|
<main className="menu-cryps">
|
||||||
|
{header}
|
||||||
|
<div className="list">
|
||||||
{crypPanels}
|
{crypPanels}
|
||||||
{spawnButtons}
|
{spawnButtons}
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user