diff --git a/package-lock.json b/package-lock.json
index 130377c..7f64291 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5679,7 +5679,7 @@
},
"core-js": {
"version": "2.5.5",
- "resolved": "http://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz",
"integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs="
},
"firebase": {
@@ -12513,9 +12513,9 @@
}
},
"react-cookie": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/react-cookie/-/react-cookie-3.0.7.tgz",
- "integrity": "sha512-c4lGOqIPC54kUocE7kbuqZNeIdXtZGzXQMA7BSWhaJ/5tWeoW5fJ7mF/pR+rU5fYDF9kktTHCIbovwSsNYblOg==",
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/react-cookie/-/react-cookie-3.0.8.tgz",
+ "integrity": "sha512-Gdop2Cf2pBFA0r4L9l5DRghKsPVMNKRM3x2aeyJ4JSaENpWWPP4v9LJvvtxXs3AboOGCuMj19oUw04Z9cVQQTg==",
"requires": {
"@types/hoist-non-react-statics": "^3.0.1",
"hoist-non-react-statics": "^3.0.0",
@@ -12523,9 +12523,9 @@
},
"dependencies": {
"hoist-non-react-statics": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.2.0.tgz",
- "integrity": "sha512-3IascCRfaEkbmHjJnUxWSspIUE1okLPjGTMVXW8zraUo1t3yg1BadKAxAGILHwgoBzmMnzrgeeaDGBvpuPz6dA==",
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.2.1.tgz",
+ "integrity": "sha512-TFsu3TV3YLY+zFTZDrN8L2DTFanObwmBLpWvJs1qfUuEQ5bTAdFcwfx2T/bsCXfM9QHSLvjfP+nihEl0yvozxw==",
"requires": {
"react-is": "^16.3.2"
}
diff --git a/package.json b/package.json
index af07e07..90499fb 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
"material-ui-icons": "^1.0.0-beta.36",
"moment": "^2.22.2",
"react": "^16.5.1",
- "react-cookie": "^3.0.7",
+ "react-cookie": "^3.0.8",
"react-dom": "^16.5.1",
"react-image-gallery": "^0.8.12",
"react-quiz-component": "0.2.0",
diff --git a/src/components/flamelink/FlameLinkCollection.js b/src/components/flamelink/FlameLinkCollection.js
index 5ede9a0..228839c 100644
--- a/src/components/flamelink/FlameLinkCollection.js
+++ b/src/components/flamelink/FlameLinkCollection.js
@@ -1,24 +1,32 @@
import React, { Component } from 'react';
import flamelinkApp from '../../utilities/flamelink.js';
+import Grid from '@material-ui/core/Grid';
import FlameLinkCollectionComponentCreations from './FlameLinkCollectionComponentCreations';
class FlameLinkCollection extends Component {
- state = {
- schemaContent: '',
- }
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ schemaContent: '',
+ }
- componentDidMount() {
flamelinkApp.content.get(this.props.schemaName)
- .then(result => this.setState({
- schemaContent: result
- }))
- }
+ .then(result => this.setState({
+ schemaContent: result
+ }))
+ }
getCollectionContent(schemaData) {
var arr2 = [];
var collectionInfo = [schemaData, this.state.schemaContent];
for (var val in this.state.schemaContent) {
- arr2[this.state.schemaContent[val]['order']] = val;
+ if ( this.state.schemaContent[val].hasOwnProperty('order') ) {
+ arr2[this.state.schemaContent[val]['order']] = val;
+ }
+ else{
+ arr2.push(val);
+ }
}
return arr2.map(this.getCollectionComponentInfo, collectionInfo);
}
@@ -28,6 +36,7 @@ class FlameLinkCollection extends Component {
for (var val in this[0]) {
arr3.push(val);
}
+
return