hotfix import stockInfoDev

This commit is contained in:
2023-07-05 00:05:04 +02:00
parent 31745cf4dd
commit 4884b3af2c
+7 -7
View File
@@ -73,13 +73,13 @@ export default defineComponent({
}),
async created() {
if (import.meta.env['VITE_STOCK_DEV'] == '1') {
const data = await import('../stockInfoDev.json');
this.store.stockData = data.default as any;
} else {
const stockData = await (await fetch(`https://spythere.github.io/api/td2/data/stockInfo.json`)).json();
this.store.stockData = stockData;
}
/* dev info testing */
// if (import.meta.env['VITE_STOCK_DEV'] == '1') {
// const data = await import('../stockInfoDev.json');
// this.store.stockData = data.default as any;
// }
const stockData = await (await fetch(`https://spythere.github.io/api/td2/data/stockInfo.json`)).json();
this.store.stockData = stockData;
// routing
switch (window.location.pathname) {