From 06925ced371db7f9dcd544397a2233c0fed0430b Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 8 Feb 2019 11:25:51 +0100 Subject: [PATCH] define categories in data file --- src/data/form-publish.json | 44 ++++++++++++---- src/pages/Publish.tsx | 103 ++++--------------------------------- 2 files changed, 46 insertions(+), 101 deletions(-) diff --git a/src/data/form-publish.json b/src/data/form-publish.json index c13196e..309c3b0 100644 --- a/src/data/form-publish.json +++ b/src/data/form-publish.json @@ -38,14 +38,7 @@ "label": "Type", "type": "select", "required": true, - "options": [ - "---", - "Data set", - "Algorithm", - "Container", - "Workflow", - "Other" - ] + "options": ["", "Data set", "Algorithm", "Container", "Workflow", "Other"] }, "license": { "label": "License", @@ -72,7 +65,40 @@ "label": "Categories", "type": "select", "required": true, - "options": ["No Category Specified"] + "options": [ + "", + "Image Recognition", + "Dataset Of Datasets", + "Language", + "Performing Arts", + "Visual Arts & Design", + "Philosophy", + "History", + "Theology", + "Anthropology & Archeology", + "Sociology", + "Psychology", + "Politics", + "Interdisciplinary", + "Economics & Finance", + "Demography", + "Biology", + "Chemistry", + "Physics & Energy", + "Earth & Climate", + "Space & Astronomy", + "Mathematics", + "Computer Technology", + "Engineering", + "Agriculture & Bio Engineering", + "Transportation", + "Urban Planning", + "Medicine", + "Business & Management", + "Sports & Recreation", + "Communication & Journalism", + "Other" + ] } } } diff --git a/src/pages/Publish.tsx b/src/pages/Publish.tsx index ae68d7f..bb8adea 100644 --- a/src/pages/Publish.tsx +++ b/src/pages/Publish.tsx @@ -124,99 +124,18 @@ class Publish extends Component<{}, PublishState> { > {this.formFields(entries)} -
- Category: - -
- - {states => ( -
- {states.isLogged ? ( - - ) : ( - - )} -
- )} + {states => + states.isLogged ? ( + + ) : ( + + ) + }