From f2ba8ddbea7d3587aadf922ea284aa06d3a9ed8a Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 19 Apr 2023 00:30:53 -0700 Subject: [PATCH] Implement GuidebooksGrid in WeaponGrid --- components/weapon/WeaponGrid/index.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/components/weapon/WeaponGrid/index.tsx b/components/weapon/WeaponGrid/index.tsx index 7ed5adb4..e0e3c433 100644 --- a/components/weapon/WeaponGrid/index.tsx +++ b/components/weapon/WeaponGrid/index.tsx @@ -11,6 +11,8 @@ import classNames from 'classnames' import Alert from '~components/common/Alert' import WeaponUnit from '~components/weapon/WeaponUnit' import ExtraWeaponsGrid from '~components/extra/ExtraWeaponsGrid' +import ExtraContainer from '~components/extra/ExtraContainer' +import GuidebooksGrid from '~components/extra/GuidebooksGrid' import WeaponConflictModal from '~components/weapon/WeaponConflictModal' import api from '~utils/api' @@ -25,8 +27,11 @@ interface Props { new: boolean editable: boolean weapons?: GridWeapon[] + guidebooks?: GuidebookList createParty: (details: DetailsObject) => Promise pushHistory?: (path: string) => void + updateExtra: (enabled: boolean) => void + updateGuidebook: (book: Guidebook, position: number) => void } const WeaponGrid = (props: Props) => { @@ -365,6 +370,13 @@ const WeaponGrid = (props: Props) => { updateObject={receiveWeaponFromSearch} updateUncap={initiateUncapUpdate} /> + ) @@ -418,9 +430,7 @@ const WeaponGrid = (props: Props) => {
    {weaponGridElement}
- {(() => { - return party.extra ? extraGridElement : '' - })()} + {extraElement} ) }