refactor: onUserId
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
This commit is contained in:
parent
d08c1ac86f
commit
2593876813
|
@ -64,16 +64,22 @@ const onConfirmPay = async () => {
|
||||||
await tpv.pay(amountToPay.value);
|
await tpv.pay(amountToPay.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
watch(
|
const onUserId = (cb) => watch(
|
||||||
() => userStore?.user?.id,
|
() => userStore?.user?.id,
|
||||||
async userId => {
|
async userId => {
|
||||||
if (userId) {
|
if (userId) {
|
||||||
await getDebt(userId);
|
try {
|
||||||
|
await cb(userId);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
onUserId(getDebt);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
Loading…
Reference in New Issue