diff --git a/src/components/FlameLinkCollectionGallery.js b/src/components/FlameLinkCollectionGallery.js
index 8f4910b..0e53917 100644
--- a/src/components/FlameLinkCollectionGallery.js
+++ b/src/components/FlameLinkCollectionGallery.js
@@ -31,7 +31,7 @@ class FlameLinkCollectionGallery extends Component {
super(props);
global.mediaURLs = [];
- global.mediaIDs = [];
+ //global.mediaIDs = [];
this.state = {
schemaDetails: '',
@@ -60,25 +60,26 @@ class FlameLinkCollectionGallery extends Component {
getGalleryInfo(schemaDetails, schemaContent) {
var key;
- var mediaNums = []
+ var mediaNums = [];
+ var mediaIDs = [];
for (var val in schemaDetails) {
key = schemaDetails[val].key
}
for (var val1 in schemaContent) {
for (var val2 in schemaContent[val1][key]) {
- global.mediaIDs.push(schemaContent[val1][key][val2]);
+ mediaIDs.push(schemaContent[val1][key][val2]);
}
}
- for (var val3 in global.mediaIDs) {
+ for (var val3 in mediaIDs) {
mediaNums.push(val3)
}
- return mediaNums.map(this.createGallery);
+ return mediaNums.map(this.createGallery, mediaIDs);
}
- createGallery = num => {
- return
+ createGallery(num) {
+ return
}
render() {
@@ -92,7 +93,7 @@ class FlameLinkCollectionGallery extends Component {
-
+
diff --git a/src/components/FlameLinkCollectionGalleryContent.js b/src/components/FlameLinkCollectionGalleryContent.js
index 9e34d5e..d93c7de 100644
--- a/src/components/FlameLinkCollectionGalleryContent.js
+++ b/src/components/FlameLinkCollectionGalleryContent.js
@@ -12,7 +12,7 @@ class FlameLinkCollectionGalleryContent extends Component {
mediaURL: '',
}
- flamelinkApp.storage.getURL(global.mediaIDs[this.props.num])
+ flamelinkApp.storage.getURL(this.props.mediaIDs[this.props.num])
.then(url => this.setState({
mediaURL: url
}))