Enable global site transition via a .env boolean
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-03-28 18:05:47 +01:00
parent 0635b65abf
commit a883c3ba94
3 changed files with 9 additions and 10 deletions

11
.env
View File

@@ -1,10 +1,11 @@
# Website
PROD_URL=https://housesof.world
PROD_URL="https://housesof.world"
TRANSITION=false
# API
API_TOKEN=NJk0urljsdSvApUDzWxGgoO6
API_URL_DEV=http://api.housesof.localhost/how
API_URL_PROD=https://api.housesof.world/_
API_TOKEN="NJk0urljsdSvApUDzWxGgoO6"
API_URL_DEV="http://api.housesof.localhost/how"
API_URL_PROD="https://api.housesof.world/_"
# Tracking
GA_TRACKER_ID=UA-4060922-27
GA_TRACKER_ID="UA-4060922-27"

View File

@@ -104,6 +104,8 @@
<slot></slot>
{#if process.env.CONFIG.TRANSITION === 'true'}
<Transition />
<AnalyticsTracker {stores} id={process.env.CONFIG.GA_TRACKER_ID} />
{/if}
<AnalyticsTracker {stores} id={process.env.CONFIG.GA_TRACKER_ID} />

View File

@@ -22,7 +22,6 @@
*/
let scope
let firstLoad = true
let previousPage
// 1. Watch page change
page.subscribe(page => {
@@ -35,9 +34,6 @@
// Set pageReady to false (?)
pageReady.set(false)
// Store current page
previousPage = page
})
// 2. Watch when loaded changes