-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-join-waitlist-js-53f3c178330c6cff6ef2.js.map
1 lines (1 loc) · 18.2 KB
/
component---src-pages-join-waitlist-js-53f3c178330c6cff6ef2.js.map
1
{"version":3,"sources":["webpack:///./src/components/Join.js","webpack:///./src/components/User.js","webpack:///./src/pages/joinWaitlist.js","webpack:///./src/assets/images/logo.png","webpack:///./src/assets/images/join.jpg","webpack:///./src/assets/images/user.jpg","webpack:///./src/assets/images/smallFlag.svg"],"names":["Join","state","email","password","isLoading","_handleChange","e","_this$setState","_this","setState","target","id","value","_signUp","preventDefault","_this$state","onLogin","props","console","log","window","uk","auth","signup","result","render","_this$state2","this","react_default","a","createElement","className","width","alt","src","Logo","onSubmit","htmlFor","required","type","onChange","placeholder","href","Component","occupations","label","sizes","subLabel","User","size","occupation","phone","fName","lName","_handleSubmit","_this$props","token","onUpdated","profileData","name","profile","updateProfile","code","data","axios","method","url","apiURL","query","headers","authorization","then","_React$createElement","_this2","Flag","map","key","style","marginTop","marginBottom","s","onClick","photo","join","user","JoinWaitlist","currentPage","error","profileID","_checkLogin","profiles","account_email","_account_email","mtData","res","_id","_handleUpdated","location","layout","stopPropagation","backgroundImage","Join_Join","User_User","React","module","exports","__webpack_require__","p"],"mappings":"uJAGqBA,sJACnBC,MAAQ,CACNC,MAAO,GACPC,SAAU,GACVC,WAAW,KAGbC,cAAgB,SAACC,GAAD,IAAAC,EAAA,OAAOC,EAAKC,WAALF,EAAA,IAAiBD,EAAEI,OAAOC,IAAKL,EAAEI,OAAOE,MAAxCL,OAEvBM,QAAU,SAACP,GACTA,EAAEQ,iBADa,IAAAC,EAEaP,EAAKP,MAAzBC,EAFOa,EAEPb,MAAOC,EAFAY,EAEAZ,SACPa,EAAYR,EAAKS,MAAjBD,QACRR,EAAKC,SAAS,CAAEL,WAAW,IAC3Bc,QAAQC,IAAIC,OAAOC,IACnBD,OAAOC,GAAGC,KAAKC,OAAO,CAAErB,QAAOC,YAAY,SAA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xCH,EAAAC,QAAiBC,EAAAC,EAAuB,wECAxCH,EAAAC,QAAiBC,EAAAC,EAAuB,wECAxCH,EAAAC,QAAiBC,EAAAC,EAAuB","file":"component---src-pages-join-waitlist-js-53f3c178330c6cff6ef2.js","sourcesContent":["import React, { Component } from 'react'\nimport Logo from '../assets/images/logo.png'\n\nexport default class Join extends Component {\n state = {\n email: '',\n password: '',\n isLoading: false\n }\n \n _handleChange = (e) => this.setState({ [e.target.id]: e.target.value })\n\n _signUp = (e) => {\n e.preventDefault()\n const { email, password } = this.state\n const { onLogin } = this.props\n this.setState({ isLoading: true })\n console.log(window.uk)\n window.uk.auth.signup({ email, password }, result => {\n this.setState({ isLoading: false })\n onLogin && onLogin(result)\n })\n }\n\n render() {\n const { email, password } = this.state\n return (\n <div className='join clearfix'>\n <div className='logo clearfix'><img width='218' alt='' src={Logo} /></div>\n <form className='join-form' onSubmit={this._signUp} >\n <label htmlFor='email'>E-mail</label>\n <input required type='email' value={email} onChange={this._handleChange} id='email' placeholder='Enter your email' />\n <label htmlFor='password'>Password</label>\n <input required value={password} onChange={this._handleChange} type='password' id='password' placeholder='Enter your password' />\n <button>Join the Waitlist</button>\n </form>\n <div className=\"join-tryon-main\">\n <span className=\"join-tryon\">Try on styles and order on the spot in our CBD office!</span>\n <br></br>\n <a className=\"join-tryon-whatsapp\" href='https://api.whatsapp.com/send?phone=6581237783' target=\"_blank\" >WhatsApp us</a>\n <span className=\"join-tryon\"> to book an in-person fitting.</span>\n </div>\n </div>\n\n );\n }\n}\n","import React, { Component } from 'react';\nimport Flag from '../assets/images/smallFlag.svg'\nimport axios from 'axios'\n\nconst occupations = [\n {\n label: 'Administrator',\n value: 'Administrator',\n },\n {\n label: 'Accountant',\n value: 'Accountant',\n },\n {\n label: 'Advertising',\n value: 'Advertising',\n },\n {\n label: 'Architect',\n value: 'Architect',\n },\n {\n label: 'Banker',\n value: 'Banker',\n },\n {\n label: 'Beauty Advisor',\n value: 'Beauty Advisor',\n },\n {\n label: 'Consultant',\n value: 'Consultant',\n },\n {\n label: 'Computing/Software Services',\n value: 'Computing/Software Services',\n },\n {\n label: 'Designer',\n value: 'Designer',\n },\n {\n label: 'Doctor',\n value: 'Doctor',\n },\n {\n label: 'Engineer',\n value: 'Engineer',\n },\n {\n label: 'E-Commerce',\n value: 'E-Commerce',\n },\n {\n label: 'Entrepreneur / Business Owner',\n value: 'Entrepreneur / Business Owner',\n },\n {\n label: 'Fashion & Media',\n value: 'Fashion & Media',\n },\n {\n label: 'Insurance Agent',\n value: 'Insurance Agent',\n },\n {\n label: 'Journalist / Writer',\n value: 'Journalist / Writer',\n },\n {\n label: 'Lawyer',\n value: 'Lawyer',\n },\n {\n label: 'Nurse',\n value: 'Nurse',\n },\n {\n label: 'Paralegal',\n value: 'Paralegal',\n },\n {\n label: 'Professor',\n value: 'Professor',\n },\n {\n label: 'Retail',\n value: 'Retail',\n },\n {\n label: 'Teacher',\n value: 'Teacher',\n },\n {\n label: 'Tourism',\n value: 'Tourism',\n },\n {\n label: 'Others',\n value: 'Others'\n },\n]\nconst sizes = [\n { value: 'xs', label: 'XS', subLabel: 'UK 6' },\n { value: 's', label: 'S', subLabel: 'UK 8' },\n { value: 'm', label: 'M', subLabel: 'UK 10' },\n { value: 'l', label: 'L', subLabel: 'UK 12' }\n]\n\nexport default class User extends Component {\n state = {\n size: 's',\n occupation: 'Administrator',\n phone: '',\n fName: '',\n lName: '',\n }\n\n _handleChange = e => this.setState({ [e.target.id]: e.target.value })\n _handleSubmit = e => {\n e.preventDefault()\n const { size, occupation, phone, fName, lName } = this.state\n const { token, onUpdated } = this.props\n const profileData = {\n size,\n occupation,\n phone,\n name: fName + ' ' + lName,\n }\n window.uk.profile.updateProfile(profileData, result => {\n if (result.code) {\n const data = `\n mutation{\n guestMutation{\n profileUpdateOne(record:{\n name: \"${profileData.name}\"\n }) {\n recordId\n record {\n email\n name\n accountId\n distinctId\n profileId\n phoneNumber\n customerId\n subscriptionId\n current_period_end\n current_period_start\n isPaid\n planId\n height\n weight\n bust\n waist\n hip\n recentOrderId\n lastVisit\n updatedAt\n createdAt\n }\n }\n }\n }`\n axios({\n method: 'post',\n url: window.apiURL,\n data: { query: data },\n headers: {\n authorization: token,\n }\n }).then(() => onUpdated())\n }\n })\n }\n render() {\n const { size } = this.state\n return (\n <div className='user'>\n <h1 className='headerMessage'>Last step! Complete this so we can onboard you.</h1>\n <form onSubmit={this._handleSubmit}>\n <div className='userFields'>\n <label>First name</label>\n <input id='fName' onChange={this._handleChange} placeholder='Input your name' required />\n </div>\n <div className='userFields'>\n <label>Surname</label>\n <input id='lName' onChange={this._handleChange} placeholder='Input your name' required />\n </div>\n <div className='clearfix' />\n <div className='user-phone clearfix userFields'>\n <label>Phone number</label>\n <img src={Flag} alt='' />\n <span>65+</span>\n <input id='phone' className='phone' onChange={this._handleChange} placeholder='Enter your number' className='phone-number' required type='number' />\n </div>\n <label>Occupation</label>\n <div className=\"select-style\">\n <select id='occupation' onChange={this._handleChange} placeholder='ABC'>\n {occupations.map(occupation => <option key={occupation.value} value={occupation.value}>{occupation.label}</option>)}\n </select>\n </div>\n\n <label style={{ marginTop: 15, marginBottom: 5 }}>Your size</label>\n <div className='sizes'>\n {sizes.map(s => <div\n key={s.value}\n onClick={() => this.setState({ size: s.value })}\n className={`size${size === s.value ? ' active' : ''}`}>\n <div className='size-label'>{`${s.label} - ${s.subLabel}`}</div>\n </div>)}\n </div>\n <div style={{width:'100%'}}>\n <button className='join-now-button'>Join now</button>\n </div>\n\n </form>\n </div>\n );\n }\n}\n\n","import React from 'react';\nimport Join from \"../components/Join\";\nimport Helmet from 'react-helmet'\nimport join from '../assets/images/join.jpg'\nimport user from '../assets/images/user.jpg'\nimport User from \"../components/User\";\nimport axios from 'axios'\nimport Layout from '../components/layout';\nimport '../assets/css/waitlist.css';\nconst photo = { join, user }\n\nclass JoinWaitlist extends React.Component {\n state = {\n currentPage: 'join',\n error: false,\n profileID: '',\n token: '',\n }\n _checkLogin = (result) => {\n if (result.code === 200) {\n const { data } = result\n const profile = data.profiles[0]\n const { account_email } = profile\n window.uk.profile.updateProfile({ _account_email: account_email })\n if (!profile.occupation) {\n const mtData = `\n mutation{\n guestMutation{\n create(record:{email: \"${account_email}\"}) {\n recordId\n record {\n email\n name\n accountId\n distinctId\n profileId\n phoneNumber\n customerId\n subscriptionId\n current_period_end\n current_period_start\n isPaid\n planId\n height\n weight\n bust\n waist\n hip\n recentOrderId\n lastVisit\n updatedAt\n createdAt\n }\n }\n }\n }\n `\n axios({\n method: 'post',\n url: window.apiURL,\n data: { query: mtData },\n headers: {\n authorization: data.token,\n }\n }).then(res => {\n this.setState({ profileID: profile._id, token: data.token, currentPage: 'user' })\n })\n\n\n } else this.setState({ error: true })\n } else {\n this.setState({ error: true })\n }\n }\n\n _handleUpdated = () => {\n window.location = 'https://madthread.com/thank-you'\n }\n render() {\n const { currentPage, profileID, token, error } = this.state\n return (\n <Layout> \n {error && <div className='error' onClick={() => this.setState({ error: false })}>\n <div onClick={(e) => e.stopPropagation()}>\n <h1>Woops.</h1>\n <div>Email already exists.</div>\n </div> \n </div>}\n\n <div className='loading' />\n\n <div className='main'>\n <div className='main-photo' style={{ backgroundImage: `url(${photo[currentPage]})` }} />\n <div className='main-content-page'>\n {currentPage === 'join'}\n <div className='main-content clearfix'>\n {currentPage === 'join' && <Join onLogin={this._checkLogin} />}\n {currentPage === 'user' && <User profileID={profileID} token={token} onUpdated={this._handleUpdated} />}\n </div>\n </div>\n </div>\n </Layout>\n );\n }\n}\n\nexport default JoinWaitlist;","module.exports = __webpack_public_path__ + \"static/logo-f55428ffc72e5460d0a9b2056ea39bd0.png\";","module.exports = __webpack_public_path__ + \"static/join-29ebeb180662999d5e1e75c765ce9ffd.jpg\";","module.exports = __webpack_public_path__ + \"static/user-baef887270762d41098ad2e3171748dd.jpg\";","module.exports = __webpack_public_path__ + \"static/smallFlag-87b02b83047427a4c6486ad1878565d6.svg\";"],"sourceRoot":""}