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() { async created() {
if (import.meta.env['VITE_STOCK_DEV'] == '1') { /* dev info testing */
const data = await import('../stockInfoDev.json'); // if (import.meta.env['VITE_STOCK_DEV'] == '1') {
this.store.stockData = data.default as any; // const data = await import('../stockInfoDev.json');
} else { // 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; const stockData = await (await fetch(`https://spythere.github.io/api/td2/data/stockInfo.json`)).json();
} this.store.stockData = stockData;
// routing // routing
switch (window.location.pathname) { switch (window.location.pathname) {