fix waiting component to be rendered by adding the function to render listing component on unMounted lifecycle

This commit is contained in:
RcleydsonR
2023-02-27 17:23:46 -03:00
parent 34c5ce3b87
commit 309c57b808
2 changed files with 8 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ import type { ValidDeposit } from "@/model/ValidDeposit";
import type { WalletTransaction } from "@/model/WalletTransaction";
import { useEtherStore } from "@/store/ether";
import { storeToRefs } from "pinia";
import { ref, watch } from "vue";
import { onMounted, ref, watch } from "vue";
import ListingComponent from "../ListingComponent/ListingComponent.vue";
// props
@@ -65,16 +65,17 @@ const callWithdraw = async (amount: string) => {
}
};
await getWalletTransactions();
// Emits
const emit = defineEmits(["makeAnotherTransaction"]);
// observer
watch(props, async (): Promise<void> => {
console.log(props);
if (props.isCurrentStep) await getWalletTransactions();
});
onMounted(async () => {
await getWalletTransactions();
});
</script>
<template>