From 54fc9deef7ce267a918b476b2e656a592392544b Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Sat, 28 Nov 2020 14:01:35 +0200 Subject: [PATCH] fix dark bg bug --- TODO.md | 1 + components/common/WeaponSelector.tsx | 30 +++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/TODO.md b/TODO.md index 511ddbacb..77661a36a 100644 --- a/TODO.md +++ b/TODO.md @@ -7,6 +7,7 @@ - [x] Builds link to /analyzer - [x] Check that user page fallback / redirect works - [x] Builds mode icons +- [ ] Fix db hitting connection limit - [ ] Script to parse data from Top 500 .json to the DB - [ ] Top 500 Leaderboards - [ ] Localization diff --git a/components/common/WeaponSelector.tsx b/components/common/WeaponSelector.tsx index 942d28f92..3485678f1 100644 --- a/components/common/WeaponSelector.tsx +++ b/components/common/WeaponSelector.tsx @@ -32,22 +32,20 @@ const WeaponSelector: React.FC = ({ - {weaponsWithHeroCategorizedLocalized.map((wpnCategory) => ( - - {wpnCategory.weapons.map((wpn) => { - if ( - excludeAlt && - (wpn.includes("Hero") || wpn.includes("Octo Shot")) - ) - return null; - return ( - - ); - })} - - ))} + {weaponsWithHeroCategorizedLocalized.flatMap((wpnCategory) => + wpnCategory.weapons.map((wpn) => { + if ( + excludeAlt && + (wpn.includes("Hero") || wpn.includes("Octo Shot")) + ) + return null; + return ( + + ); + }) + )} );