Skip to content

Commit

Permalink
chore: get user state for email update
Browse files Browse the repository at this point in the history
  • Loading branch information
KabinKhandThakuri committed Jan 7, 2025
1 parent ea74fab commit b280c1c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/vue-user/src/components/profile/AccountInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default {
import { useConfig } from "@dzangolab/vue3-config";
import { useI18n } from "@dzangolab/vue3-i18n";
import { Data } from "@dzangolab/vue3-ui";
import { storeToRefs } from "pinia";
import { ref } from "vue";
import UpdateEmailModal from "./UpdateEmailModal.vue";
Expand All @@ -49,9 +50,12 @@ import useUserStore from "../../store";
const messages = useTranslations();
const { t } = useI18n({ messages });
const { user: userConfig } = useConfig();
const { user } = useUserStore();
const userStore = useUserStore();
const canUpdateEmail = userConfig?.features?.updateEmail && !user?.thirdParty;
const { user } = storeToRefs(userStore);
const canUpdateEmail =
userConfig?.features?.updateEmail && !user.value?.thirdParty;
const showModal = ref<boolean>(false);
</script>
Expand Down

0 comments on commit b280c1c

Please sign in to comment.