Update some maps

This commit is contained in:
Bill 2021-07-03 22:14:49 -04:00
parent 5ca61ece5e
commit 28060820b5
11 changed files with 22 additions and 22 deletions

View File

@ -93,10 +93,10 @@ export const CatalogView: FC<CatalogViewProps> = props =>
<NitroCardView className="nitro-catalog"> <NitroCardView className="nitro-catalog">
<NitroCardHeaderView headerText={ LocalizeText('catalog.title') } onCloseClick={ event => setIsVisible(false) } /> <NitroCardHeaderView headerText={ LocalizeText('catalog.title') } onCloseClick={ event => setIsVisible(false) } />
<NitroCardTabsView> <NitroCardTabsView>
{ root && root.children.length && root.children.map((page, index) => { root && root.children.length && root.children.map(page =>
{ {
return ( return (
<NitroCardTabsItemView key={ index } isActive={ (currentTab === page) } onClick={ event => setCurrentTab(page) }> <NitroCardTabsItemView key={ page.pageId } isActive={ (currentTab === page) } onClick={ event => setCurrentTab(page) }>
{ page.localization } { page.localization }
</NitroCardTabsItemView> </NitroCardTabsItemView>
); );

View File

@ -35,11 +35,11 @@ export const CatalogNavigationSetView: FC<CatalogNavigationSetViewProps> = props
return ( return (
<div className="row row-cols-1 g-0 catalog-navigation-set-container w-100"> <div className="row row-cols-1 g-0 catalog-navigation-set-container w-100">
{ page && (page.children.length > 0) && page.children.map((page, index) => { page && (page.children.length > 0) && page.children.map(page =>
{ {
if(!page.visible) return null; if(!page.visible) return null;
return <CatalogNavigationItemView key={ index } page={ page } isActive={ (activeChild === page) } setActiveChild={ setActiveChild } /> return <CatalogNavigationItemView key={ page.pageId } page={ page } isActive={ (activeChild === page) } setActiveChild={ setActiveChild } />
}) } }) }
</div> </div>
); );

View File

@ -8,9 +8,9 @@ export const InventoryActiveBadgeResultsView: FC<InventoryActiveBadgeResultsView
return ( return (
<div className="row row-cols-3 align-content-start g-0"> <div className="row row-cols-3 align-content-start g-0">
{ badges && (badges.length > 0) && badges.map((code, index) => { badges && (badges.length > 0) && badges.map(code =>
{ {
return <InventoryBadgeItemView key={ index } badge={ code } /> return <InventoryBadgeItemView key={ code } badge={ code } />
}) } }) }
</div> </div>
); );

View File

@ -9,11 +9,11 @@ export const InventoryBadgeResultsView: FC<InventoryBadgeResultsViewProps> = pro
return ( return (
<div className="h-100 overflow-hidden"> <div className="h-100 overflow-hidden">
<div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto"> <div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto">
{ badges && (badges.length > 0) && badges.map((code, index) => { badges && (badges.length > 0) && badges.map(code =>
{ {
if(activeBadges.indexOf(code) >= 0) return null; if(activeBadges.indexOf(code) >= 0) return null;
return <InventoryBadgeItemView key={ index } badge={ code } /> return <InventoryBadgeItemView key={ code } badge={ code } />
}) } }) }
</div> </div>
</div> </div>

View File

@ -9,9 +9,9 @@ export const InventoryBotResultsView: FC<InventoryBotResultsViewProps> = props =
return ( return (
<div className="h-100 overflow-hidden"> <div className="h-100 overflow-hidden">
<div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto"> <div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto">
{ botItems && (botItems.length > 0) && botItems.map((item, index) => { botItems && (botItems.length > 0) && botItems.map(item =>
{ {
return <InventoryBotItemView key={ index } botItem={ item } /> return <InventoryBotItemView key={ item.id } botItem={ item } />
}) } }) }
</div> </div>
</div> </div>

View File

@ -9,9 +9,9 @@ export const InventoryPetResultsView: FC<InventoryPetResultsViewProps> = props =
return ( return (
<div className="h-100 overflow-hidden"> <div className="h-100 overflow-hidden">
<div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto"> <div className="row row-cols-5 align-content-start g-0 w-100 h-100 overflow-auto">
{ petItems && (petItems.length > 0) && petItems.map((item, index) => { petItems && (petItems.length > 0) && petItems.map(item =>
{ {
return <InventoryPetItemView key={ index } petItem={ item } /> return <InventoryPetItemView key={ item.id } petItem={ item } />
}) } }) }
</div> </div>
</div> </div>

View File

@ -122,9 +122,9 @@ export const FurnitureStickieView: FC<FurnitureStickieViewProps> = props =>
{ stickieData.canModify && { stickieData.canModify &&
<> <>
<div className="nitro-stickie-image stickie-trash header-trash" onClick={ event => processAction('trash') }></div> <div className="nitro-stickie-image stickie-trash header-trash" onClick={ event => processAction('trash') }></div>
{ STICKIE_COLORS.map((color, index) => { STICKIE_COLORS.map(color =>
{ {
return <div className="stickie-color ms-1" key={ index } onClick={ event => processAction('changeColor', color) } style={ {backgroundColor: ColorUtils.makeColorHex(color) } } /> return <div key={ color } className="stickie-color ms-1" onClick={ event => processAction('changeColor', color) } style={ {backgroundColor: ColorUtils.makeColorHex(color) } } />
})} })}
</> } </> }
</div> </div>

View File

@ -24,9 +24,9 @@ export const InfoStandWidgetBotView: FC<InfoStandWidgetBotViewProps> = props =>
<AvatarImageView figure={ botData.figure } direction={ 4 } /> <AvatarImageView figure={ botData.figure } direction={ 4 } />
</div> </div>
<div className="w-100 d-flex justify-content-center align-items-center"> <div className="w-100 d-flex justify-content-center align-items-center">
{ (botData.badges.length > 0) && botData.badges.map((result, index) => { (botData.badges.length > 0) && botData.badges.map(result =>
{ {
return <BadgeImageView key={ index } badgeCode={ result } />; return <BadgeImageView key={ result } badgeCode={ result } />;
}) } }) }
</div> </div>
</div> </div>

View File

@ -36,9 +36,9 @@ export const InfoStandWidgetRentableBotView: FC<InfoStandWidgetRentableBotViewPr
<AvatarImageView figure={ rentableBotData.figure } direction={ 4 } /> <AvatarImageView figure={ rentableBotData.figure } direction={ 4 } />
</div> </div>
<div className="w-100 d-flex justify-content-center align-items-center"> <div className="w-100 d-flex justify-content-center align-items-center">
{ (rentableBotData.badges.length > 0) && rentableBotData.badges.map((result, index) => { (rentableBotData.badges.length > 0) && rentableBotData.badges.map(result =>
{ {
return <BadgeImageView key={ index } badgeCode={ result } />; return <BadgeImageView key={ result } badgeCode={ result } />;
}) } }) }
</div> </div>
</div> </div>

View File

@ -26,9 +26,9 @@ export const WiredConditionActorHasHandItemView: FC<{}> = props =>
<div className="form-group"> <div className="form-group">
<label className="fw-bold">{ LocalizeText('wiredfurni.params.handitem') }</label> <label className="fw-bold">{ LocalizeText('wiredfurni.params.handitem') }</label>
<select className="form-select form-select-sm" value={ handItemId } onChange={ event => setHandItemId(parseInt(event.target.value)) }> <select className="form-select form-select-sm" value={ handItemId } onChange={ event => setHandItemId(parseInt(event.target.value)) }>
{ allowedHanditemIds.map((value, index) => { allowedHanditemIds.map(value =>
{ {
return <option key={ index } value={ value }>{ LocalizeText(`handitem${ value }`) }</option> return <option key={ value } value={ value }>{ LocalizeText(`handitem${ value }`) }</option>
}) } }) }
</select> </select>
</div> </div>

View File

@ -25,10 +25,10 @@ export const WiredConditionActorIsTeamMemberView: FC<{}> = props =>
<WiredConditionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }> <WiredConditionBaseView requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE } save={ save }>
<div className="form-group"> <div className="form-group">
<label className="fw-bold">{ LocalizeText('wiredfurni.params.team') }</label> <label className="fw-bold">{ LocalizeText('wiredfurni.params.team') }</label>
{ teamIds.map((value, index) => { teamIds.map(value =>
{ {
return ( return (
<div key={ index } className="form-check"> <div key={ value } className="form-check">
<input className="form-check-input" type="radio" name="selectedTeam" id={ `selectedTeam${ value }` } checked={ (selectedTeam === value) } onChange={ event => setSelectedTeam(value) } /> <input className="form-check-input" type="radio" name="selectedTeam" id={ `selectedTeam${ value }` } checked={ (selectedTeam === value) } onChange={ event => setSelectedTeam(value) } />
<label className="form-check-label" htmlFor={ `selectedTeam${ value }` }> <label className="form-check-label" htmlFor={ `selectedTeam${ value }` }>
{ LocalizeText(`wiredfurni.params.team.${ value }`) } { LocalizeText(`wiredfurni.params.team.${ value }`) }