Fix national_rates.json deployment — copy to public/ directory
Deploy to git-pages / deploy (push) Successful in 19s
Deploy to git-pages / deploy (push) Successful in 19s
- Add missing data/national_rates.json fixture (was only in src/data/, not served by Vite) - LoadingAnimation.jsx: Use import.meta.env.BASE_URL for national rates path - Ensures file is available at /crdc-demo/data/national_rates.json on git-pages
This commit is contained in:
@@ -67,7 +67,7 @@ export default function LoadingAnimation({ district, state }) {
|
||||
)
|
||||
|
||||
// ——— National rates (from static fixture, instant) ———
|
||||
const nationalPromise = fetch('/data/national_rates.json')
|
||||
const nationalPromise = fetch(import.meta.env.BASE_URL + 'data/national_rates.json')
|
||||
.then(r => r.json())
|
||||
.then(data => { /* cache for ChartPanel */ window.__NATIONAL_RATES__ = data })
|
||||
.catch(() => {})
|
||||
|
||||
Reference in New Issue
Block a user