Bug mapp nodemap (#897)

* desktop onMouseEnter and leave handlers added

* clicking nav option closes drawer

* All AC met

* removed dead bool

* added hamburger to AppBar for mobile users small refactor

* nuts and bolts working needs a lot of tidying though

* Functionally complete.

* change hardcode colors to theming

* UI theme and border changes

* bug fix removed collapse nav flicker

* dead code

* resetting drawer to closed onload

* removal of hardcoded color

* made null functions into optional props

* Nested sx styling not global

* paperprops now working

* fixed breaking changes for DataGrid

* linting fix

* linting fix

* optional chaining for nodemap search

* leaner filter func

Co-authored-by: Aid Thompson <adrian@nymtech.net>
This commit is contained in:
Aid19801
2021-11-12 18:22:03 +00:00
committed by GitHub
parent 50cd18a926
commit 3dc94223ae
+5 -9
View File
@@ -84,15 +84,11 @@ export const PageMixnodesMap: React.FC = () => {
);
} else if (countryData?.data !== undefined && searchTerm !== '') {
const formatted = countryDataToGridRow(Object.values(countryData?.data));
const filtered = formatted.filter((m) => {
if (
m.countryName.toLowerCase().includes(searchTerm) ||
m.ISO3.toLowerCase().includes(searchTerm)
) {
return m;
}
return null;
});
const filtered = formatted.filter(
(m) =>
m?.countryName?.toLowerCase().includes(searchTerm) ||
m?.ISO3?.toLowerCase().includes(searchTerm),
);
if (filtered) {
setFormattedCountries(filtered);
}