Disable analytics in dev env, redirect to edit page after event update

- Skip loading /stats/script.js and /assets/perf.js when data-env=dev
- Add data-env="{{ app.environment }}" to body tag
- Redirect to edit event page instead of events list after saving

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-20 22:39:38 +01:00
parent 57ea5c33ac
commit 847fc437de
3 changed files with 6 additions and 2 deletions

View File

@@ -18,6 +18,10 @@ function loadAnalytics() {
return
}
if (document.body.dataset.env === 'dev') {
return
}
const script = document.createElement('script')
script.defer = true
script.src = '/stats/script.js'