move stuff for main

This commit is contained in:
ntr
2019-05-16 21:38:43 +10:00
parent fb9e947c9c
commit 3732e5414f
9 changed files with 33 additions and 33 deletions
+6 -6
View File
@@ -11,7 +11,7 @@ const createSocket = require('./socket');
const registerEvents = require('./events');
const Header = require('./components/header.container');
const Body = require('./components/body.component');
const Main = require('./components/main');
const Nav = require('./components/nav');
// Redux Store
@@ -50,19 +50,19 @@ document.fonts.load('16pt "Jura"').then(() => {
ws.connect();
const Cryps = () => (
<main className="cryps" >
<div id="cryps" >
<Header />
<Nav />
<Body />
</main>
<Main />
</div>
);
const Main = () => (
const App = () => (
<Provider store={store}>
<Cryps />
</Provider>
);
// eslint-disable-next-line
preact.render(<Main />, document.body);
preact.render(<App />, document.body);
});
+4 -4
View File
@@ -28,7 +28,7 @@ function GamePanel(props) {
if (showLog) {
const logs = game.log.map((l, i) => (<div key={i}>{l}</div>)).reverse();
return (
<section className="game">
<main className="game">
<div className="instance-hdr">
<button
className="game-btn instance-btn instance-ui-btn left"
@@ -42,7 +42,7 @@ function GamePanel(props) {
<div className="logs">
{logs}
</div>
</section>
</main>
);
}
@@ -165,12 +165,12 @@ function GamePanel(props) {
const gameClasses = `game ${resolution ? 'resolving': ''}`;
return (
<section className={gameClasses} onClick={() => setActiveCryp(null)} >
<main className={gameClasses} onClick={() => setActiveCryp(null)} >
{header}
{timer}
{otherTeams.map(OpponentTeam)}
{PlayerTeam(playerTeam, setActiveSkill)}
</section>
</main>
);
}
+2 -2
View File
@@ -48,7 +48,7 @@ function InstanceComponent(args) {
);
return (
<section className="instance" >
<main className="instance" >
<div className="top">
{actionBtn}
{timer}
@@ -57,7 +57,7 @@ function InstanceComponent(args) {
<InfoContainer />
<EquipmentContainer />
<InstanceCrypsContainer />
</section>
</main>
);
}
@@ -19,15 +19,9 @@ function renderBody(props) {
if (!account) {
return (
<section>
<main>
<LoginContainer />
</section>
);
}
if (game) {
return (
<GameContainer />
</main>
);
}
@@ -37,6 +31,12 @@ function renderBody(props) {
);
}
if (game) {
return (
<GameContainer />
);
}
return (
<MenuContainer />
);
+2 -2
View File
@@ -145,9 +145,9 @@ function Menu(args) {
}
return (
<section className="menu">
<main className="menu">
{instanceList()}
</section>
</main>
);
}