mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
Minor cleanup (#220)
* Fix README; add missing dev dependency * Fix validators to filter out bad events and sources * Better defaults in config
This commit is contained in:
@@ -145,7 +145,7 @@
|
||||
"categories": "Categories",
|
||||
"categories_label": "Categories",
|
||||
"explore_by_category__title": "Explore events by category",
|
||||
"explore_by_category__description": "‘Categories’ refer to the victims of a given incident.<br><br>If no categories are selected, all datapoints are displayed.",
|
||||
"explore_by_category__description": "",
|
||||
"shapes": "Shapes",
|
||||
"shapes_label": "Shapes",
|
||||
"explore_by_shapes__title": "Explore events by shape breakdown",
|
||||
|
||||
@@ -184,6 +184,7 @@ class Toolbar extends React.Component {
|
||||
return (
|
||||
<div
|
||||
className={classes}
|
||||
key={iconKey}
|
||||
onClick={() => {
|
||||
this.selectTab(_selected);
|
||||
}}
|
||||
|
||||
@@ -87,12 +87,15 @@ export function validateDomain(domain, features) {
|
||||
|
||||
function validateArray(items, domainKey, schema) {
|
||||
items.forEach((item) => {
|
||||
if (domainKey === "events" && item.date === "" && item.time === "")
|
||||
return;
|
||||
validateArrayItem(item, domainKey, schema);
|
||||
});
|
||||
}
|
||||
|
||||
function validateObject(obj, domainKey, itemSchema) {
|
||||
Object.keys(obj).forEach((key) => {
|
||||
if (key === "") return;
|
||||
const vl = obj[key];
|
||||
const result = Joi.validate(vl, itemSchema);
|
||||
if (result.error !== null) {
|
||||
|
||||
Reference in New Issue
Block a user