From 4d896cb6e50afa25a65d37b6bcb9a598960da398 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 14 Sep 2020 18:29:20 -0700 Subject: [PATCH] Update WeaponGrid rendering --- src/components/WeaponGrid/WeaponGrid.css | 2 +- src/components/WeaponGrid/WeaponGrid.tsx | 35 +++++++++++++----------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/components/WeaponGrid/WeaponGrid.css b/src/components/WeaponGrid/WeaponGrid.css index dd717937..ee4d4d22 100644 --- a/src/components/WeaponGrid/WeaponGrid.css +++ b/src/components/WeaponGrid/WeaponGrid.css @@ -1,6 +1,6 @@ .WeaponGrid { display: flex; - margin-top: 48px; + margin-top: 96px; justify-content: center; } diff --git a/src/components/WeaponGrid/WeaponGrid.tsx b/src/components/WeaponGrid/WeaponGrid.tsx index 460bf034..b9d6037d 100644 --- a/src/components/WeaponGrid/WeaponGrid.tsx +++ b/src/components/WeaponGrid/WeaponGrid.tsx @@ -4,22 +4,25 @@ import './WeaponGrid.css' import WeaponGridMainhand from '../WeaponGridMainhand/WeaponGridMainhand' import WeaponGridUnit from '../WeaponGridUnit/WeaponGridUnit' -const WeaponGrid = () => ( -
- +class WeaponGrid extends React.Component { + render() { + const numWeapons = 9 + let weapons = [] -
- - - - - - - - - -
-
-) + Array.from(Array(numWeapons)).forEach((x, i) => { + weapons.push() + }) + + return ( +
+ + +
+ {weapons} +
+
+ ) + } +} export default WeaponGrid \ No newline at end of file