Update WeaponGrid rendering
This commit is contained in:
parent
99ec936fd1
commit
4d896cb6e5
2 changed files with 20 additions and 17 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
.WeaponGrid {
|
.WeaponGrid {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 48px;
|
margin-top: 96px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,22 +4,25 @@ import './WeaponGrid.css'
|
||||||
import WeaponGridMainhand from '../WeaponGridMainhand/WeaponGridMainhand'
|
import WeaponGridMainhand from '../WeaponGridMainhand/WeaponGridMainhand'
|
||||||
import WeaponGridUnit from '../WeaponGridUnit/WeaponGridUnit'
|
import WeaponGridUnit from '../WeaponGridUnit/WeaponGridUnit'
|
||||||
|
|
||||||
const WeaponGrid = () => (
|
class WeaponGrid extends React.Component {
|
||||||
<div className="WeaponGrid">
|
render() {
|
||||||
<WeaponGridMainhand />
|
const numWeapons = 9
|
||||||
|
let weapons = []
|
||||||
|
|
||||||
<div className="grid-weapons">
|
Array.from(Array(numWeapons)).forEach((x, i) => {
|
||||||
<WeaponGridUnit />
|
weapons.push(<WeaponGridUnit key={`grid_unit_${i}`} />)
|
||||||
<WeaponGridUnit />
|
})
|
||||||
<WeaponGridUnit />
|
|
||||||
<WeaponGridUnit />
|
return (
|
||||||
<WeaponGridUnit />
|
<div className="WeaponGrid">
|
||||||
<WeaponGridUnit />
|
<WeaponGridMainhand key="grid_mainhand" />
|
||||||
<WeaponGridUnit />
|
|
||||||
<WeaponGridUnit />
|
<div className="grid-weapons">
|
||||||
<WeaponGridUnit />
|
{weapons}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default WeaponGrid
|
export default WeaponGrid
|
||||||
Loading…
Reference in a new issue