- refactored to allow for stacking of special hits (NPED + Hotlist)
This commit is contained in:
@@ -147,10 +147,12 @@ export const checkIsHotListHit = (sigthing: SightingType | null) => {
|
||||
};
|
||||
|
||||
export function getHotlistName(obj: HotlistMatches | undefined) {
|
||||
if (!obj || Object.values(obj).includes(false)) return;
|
||||
if (!obj) return;
|
||||
|
||||
const keys = Object.keys(obj);
|
||||
return keys;
|
||||
const hotlistNames = Object.entries(obj)
|
||||
.filter(([, value]) => value === true)
|
||||
.map(([key]) => key);
|
||||
return hotlistNames;
|
||||
}
|
||||
|
||||
export const getNPEDCategory = (r?: SightingType | null) =>
|
||||
|
||||
Reference in New Issue
Block a user