refactor: use Salix to create or edit an Order #132

Merged
jsegarra merged 16 commits from ldragan/hedera-web:taro/sc into beta 2025-04-16 22:01:49 +00:00
1 changed files with 19 additions and 0 deletions
Showing only changes of commit cc3bc45a2c - Show all commits

19
src/utils/onUserId.js Normal file
View File

@ -0,0 +1,19 @@
import { watch } from 'vue';
import { useUserStore } from 'stores/user';
const userStore = useUserStore();
export const onUserId = (cb) => watch(
() => userStore?.user?.id,
async userId => {
if (userId) {
try {
await cb(userId);
} catch (error) {
console.error(error);
}
}
},
{ immediate: true }
);