Skip to content

Commit

Permalink
clear promise call
Browse files Browse the repository at this point in the history
  • Loading branch information
zlayine committed May 30, 2024
1 parent 4acda5e commit 86395bb
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/js/components/beam/BeamsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ const openTransactionSlide = async (transactionId: string) => {
onMounted(async () => {
await appStore.initPromise;
useAppStore().clearInitPromise();
getBeams();
loadMoreItemsWithObserver();
events.on('transaction', openTransactionSlide);
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/beam/ClaimsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ const closeModalSlide = () => {
(async () => {
await useAppStore().initPromise;
useAppStore().clearInitPromise();
await getClaims();
})();
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/marketplace/BidsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ const closeModalSlide = () => {
(async () => {
await useAppStore().initPromise;
useAppStore().clearInitPromise();
await getBids();
})();
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/marketplace/ListingsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ const closeModalSlide = () => {
(async () => {
await useAppStore().initPromise;
useAppStore().clearInitPromise();
await getListings();
})();
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/marketplace/SalesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ const closeModalSlide = () => {
(async () => {
await useAppStore().initPromise;
useAppStore().clearInitPromise();
await getSales();
})();
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/pages/Collections.vue
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ const openTransactionSlide = async (transactionId: string) => {

(async () => {
await useAppStore().initPromise;
useAppStore().clearInitPromise();
await getCollections();
})();

Expand Down
1 change: 1 addition & 0 deletions resources/js/components/pages/FuelTanks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ const openTransactionSlide = async (transactionId: string) => {
(async () => {
await useAppStore().initPromise;
useAppStore().clearInitPromise();
await getFuelTanks();
})();
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/pages/Tokens.vue
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ const openTransactionSlide = async (transactionId: string) => {
onMounted(async () => {
await useAppStore().initPromise;
useAppStore().clearInitPromise();
getTokens();
loadMoreTokensWithObserver();
events.on('transaction', openTransactionSlide);
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/pages/Transactions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ const closeModalSlide = () => {
(async () => {
await useAppStore().initPromise;
useAppStore().clearInitPromise();
getTransactions();
})();
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/pages/Wallets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ const openTransactionSlide = async (transactionId: string) => {
onMounted(async () => {
await useAppStore().initPromise;
useAppStore().clearInitPromise();
getWallets();
loadMoreItemsWithObserver();
events.on('transaction', openTransactionSlide);
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/pages/auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ const login = async (recaptcha?: string) => {
}
appStore.init();
await appStore.initPromise;
appStore.clearInitPromise();
if (appStore.loggedIn) {
snackbar.success({ title: 'Logged in successfully', save: false });
if (appStore.hasValidConfig) {
Expand Down
3 changes: 3 additions & 0 deletions resources/js/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ export const useAppStore = defineStore('app', {
setTheme(theme: 'dark' | 'light') {
this.theme = theme;
},
clearInitPromise() {
this.initPromise = null;
}
},
getters: {
hasValidConfig(state: AppState) {
Expand Down

0 comments on commit 86395bb

Please sign in to comment.