Restructure utility files, Use a bundle.css to fix CSS issues
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user