Restructure utility files, Use a bundle.css to fix CSS issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-03-03 15:36:57 +01:00
parent 241c30fb52
commit d823f28054
23 changed files with 56 additions and 67 deletions

View File

@@ -5,10 +5,10 @@
continents,
countries,
locations
} from '../store'
} from '../utils/store'
export async function preload (page, session) {
const request = await this.fetch(apiEndpoints.gql, {
const req = await this.fetch(apiEndpoints.gql, {
method: 'post',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query: `{
@@ -54,13 +54,14 @@
}
}`})
})
const result = await request.json()
// Set data into store
site.set(result.data.site.data[0])
continents.set(result.data.continents.data)
countries.set(result.data.countries.data)
locations.set(result.data.locations.data)
const result = await req.json()
if (req.ok) {
// Set data into store
site.set(result.data.site.data[0])
continents.set(result.data.continents.data)
countries.set(result.data.countries.data)
locations.set(result.data.locations.data)
}
}
</script>
@@ -82,9 +83,8 @@
$locations.forEach(loc => loc.country = $countries.find(cont => cont.id === loc.country.id))
</script>
<!-- <style src="../style/style.scss" global></style> -->
<style lang="scss" global>
@import "./style/style.scss";
@import "../style/style.scss";
</style>
<slot></slot>