mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 19:48:11 +00:00
enkapsulacja i uporządkowanie komponentów
This commit is contained in:
@@ -56,5 +56,25 @@ export const useStore = defineStore({
|
||||
chosenRealStock: (state) => chosenRealStock(state),
|
||||
acceptableMass: (state) => acceptableMass(state),
|
||||
},
|
||||
|
||||
actions: {
|
||||
async fetchStockInfoData() {
|
||||
const stockData = await (await fetch(`https://spythere.github.io/api/td2/data/stockInfo.json`)).json();
|
||||
this.stockData = stockData;
|
||||
},
|
||||
|
||||
handleRouting() {
|
||||
switch (window.location.pathname) {
|
||||
case '/numgnr':
|
||||
this.stockSectionMode = 'number-generator';
|
||||
break;
|
||||
case '/stockgnr':
|
||||
this.stockSectionMode = 'stock-generator';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user