#74: 3DS and New 3DS libraries need to be merged (#113)

* Fixed back strings

* Merged 3DS and New 3DS

* Apply suggestions from code review

Co-Authored-By: Roman Cervantes <roman.cervantes@keap.com>
This commit is contained in:
Matthew Bunge 2019-05-20 10:27:34 -07:00 committed by GitHub
parent 0969535e8b
commit a1bf2a80be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 5 deletions

View file

@ -45,7 +45,7 @@
@click="back"
>
<i class="fas fa-chevron-left" />
{{ $t('back') }}
{{ $t('global.back') }}
</button>
<igdb-credit linkable />

View file

@ -83,7 +83,7 @@
@click="cancel"
>
<i class="fas fa-chevron-left" />
{{ $t('back') }}
{{ $t('global.back') }}
</button>
<modal

View file

@ -47,9 +47,31 @@ export default {
return new Promise((resolve, reject) => {
axios.get(`${FIREBASE_URL}/search?searchText=${searchText}&platformId=${state.platform.id}`)
.then(({ data }) => {
commit('SET_SEARCH_RESULTS', data);
commit('CACHE_GAME_DATA', data);
resolve();
const originalData = data.slice();
if (state.platform.id === 37) {
axios.get('${FIREBASE_URL}/search?searchText=${searchText}&platformId=137')
.then(({ data }) => {
data.forEach((element)=> {
let found = false;
for (let i = 0; i < originalData.length; i++) {
if (originalData[i].id === element.id) {
found = true;
break;
}
}
if (!found) {
originalData.push(element);
}
});
commit('SET_SEARCH_RESULTS', originalData);
commit('CACHE_GAME_DATA', originalData);
resolve();
}).catch(reject);
} else {
commit('SET_SEARCH_RESULTS', data);
commit('CACHE_GAME_DATA', data);
resolve();
}
}).catch(reject);
});
},