Removed commented out logic

This commit is contained in:
efarooqui
2020-10-16 11:23:00 -07:00
parent b8b7c712de
commit 2cff35c3f2
5 changed files with 1 additions and 24 deletions

View File

@@ -41,13 +41,7 @@ export function fetchDomain () {
.catch(() => handleError('events'))
)
).then(results => results.flatMap(t => t))
// let catPromise = Promise.resolve([])
// if (features.USE_CATEGORIES) {
// catPromise = fetch(CATEGORY_URL)
// .then(response => response.json())
// .catch(() => handleError(domainMsg('categories')))
// }
let associationsPromise = Promise.resolve([])
if (features.USE_ASSOCIATIONS) {
@@ -87,7 +81,6 @@ export function fetchDomain () {
return Promise.all([
eventPromise,
// catPromise,
associationsPromise,
sourcesPromise,
sitesPromise,
@@ -96,7 +89,6 @@ export function fetchDomain () {
.then(response => {
const result = {
events: response[0],
// categories: response[1],
associations: response[1],
sources: response[2],
sites: response[3],

View File

@@ -148,7 +148,6 @@ const TimelineEvents = ({
>
{renderProjects()}
{events.reduce(renderEvent, [])}
{/* {events.map(event => renderEvent(event))} */}
</g>
)
}

View File

@@ -1,9 +0,0 @@
import Joi from 'joi'
const categorySchema = Joi.object().keys({
category: Joi.string().required(),
description: Joi.string(),
group: Joi.string()
})
export default categorySchema

View File

@@ -1,7 +1,6 @@
import Joi from 'joi'
import createEventSchema from './eventSchema'
import categorySchema from './categorySchema'
import siteSchema from './siteSchema'
import associationsSchema from './associationsSchema'
import sourceSchema from './sourceSchema'
@@ -47,7 +46,6 @@ function findDuplicateAssociations (associations) {
export function validateDomain (domain, features) {
const sanitizedDomain = {
events: [],
// categories: [],
sites: [],
associations: [],
sources: {},
@@ -61,7 +59,6 @@ export function validateDomain (domain, features) {
const discardedDomain = {
events: [],
// categories: [],
sites: [],
associations: [],
sources: [],
@@ -110,7 +107,6 @@ export function validateDomain (domain, features) {
const eventSchema = createEventSchema(features.CUSTOM_EVENT_FIELDS)
validateArray(domain.events, 'events', eventSchema)
// validateArray(domain.categories, 'categories', categorySchema)
validateArray(domain.sites, 'sites', siteSchema)
validateArray(domain.associations, 'associations', associationsSchema)
validateObject(domain.sources, 'sources', sourceSchema)

View File

@@ -12,7 +12,6 @@ const initial = {
domain: {
events: [],
locations: [],
// categories: [],
associations: [],
sources: {},
sites: [],