1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import EmailVerification from './components/email_verification.vue';
export default () => {
const el = document.querySelector('.js-email-verification');
if (!el) {
return null;
}
const { obfuscatedEmail, verifyPath, resendPath, offerEmailReset, updateEmailPath } = el.dataset;
return new Vue({
el,
name: 'EmailVerificationRoot',
render(createElement) {
return createElement(EmailVerification, {
props: {
obfuscatedEmail,
verifyPath,
resendPath,
isOfferEmailReset: parseBoolean(offerEmailReset),
updateEmailPath,
},
});
},
});
};
|