diff --git a/web/src/Routes.js b/web/src/Routes.js index dbb6777..5ed59d0 100644 --- a/web/src/Routes.js +++ b/web/src/Routes.js @@ -33,6 +33,7 @@ const Routes = () => { return ( + {/* */} diff --git a/web/src/components/InputText/InputText.js b/web/src/components/InputText/InputText.js index 3198506..6ab83bc 100644 --- a/web/src/components/InputText/InputText.js +++ b/web/src/components/InputText/InputText.js @@ -10,7 +10,7 @@ const InputText = ({ value, isEditable, onChange, className }) => { className )} > -
+
{ const { logIn, signUp } = useAuth() - const { addMessage } = useFlash() const [tab, setTab] = useState(shouldStartWithSignup ? 0 : 1) const onTabChange = (_, newValue) => { @@ -25,9 +22,6 @@ const LoginModal = ({ open, onClose, shouldStartWithSignup = false }) => { const onSubmitSignUp = async ({ email, password, name, userName }) => { try { setError('') - if (checkBox) { - subscribe({ email, addMessage }) - } await signUp({ email, password, diff --git a/web/src/helpers/subscribe.js b/web/src/helpers/subscribe.js deleted file mode 100644 index 7a21875..0000000 --- a/web/src/helpers/subscribe.js +++ /dev/null @@ -1,15 +0,0 @@ -export const subscribe = ({ email, addMessage }) => { - // subscribe to mailchimp newsletter - const path = window.location.hostname + window.location.pathname - try { - fetch( - `https://kurthutten.us10.list-manage.com/subscribe/post-json?u=cbd8888e924bdd99d06c14fa5&id=6a765a8b3d&EMAIL=${email}&FNAME=Kurt&PATHNAME=${path}&c=__jp0` - ) - } catch (e) { - setTimeout(() => { - addMessage('Problem subscribing to newsletter', { - classes: 'bg-red-300 text-red-900', - }) - }, 1000) - } -} diff --git a/web/src/layouts/MainLayout/MainLayout.js b/web/src/layouts/MainLayout/MainLayout.js index a195131..675e7de 100644 --- a/web/src/layouts/MainLayout/MainLayout.js +++ b/web/src/layouts/MainLayout/MainLayout.js @@ -103,6 +103,10 @@ const MainLayout = ({ children }) => { }) }) } else if (key === 'recovery_token') { + // http://localhost:8910/#recovery_token=LwsC-KpgmiDwGo-ZcGH0tA + // https://mandrillapp.com/track/click/31128206/cadhub.xyz?p=eyJzIjoiWFlFbDk5YTVYU0FOSmEtZ3ZtUXlDSW13QURrIiwidiI6MSwicCI6IntcInVcIjozMTEyODIwNixcInZcIjoxLFwidXJsXCI6XCJodHRwczpcXFwvXFxcL2NhZGh1Yi54eXpcXFwvI3JlY292ZXJ5X3Rva2VuPUx3c0MtS3BnbWlEd0dvLVpjR0gwdEFcIixcImlkXCI6XCJjODU1ZWM1MjZiZmQ0Y2JmYmUyNmM4OTk2ZGU4ODczOFwiLFwidXJsX2lkc1wiOltcIjJkMjljMDI0NTY5MzcxODcxMmI0ODA0M2U3MDYyOTA1ZDc1NzVkNjlcIl19In0 + // #recovery_token=LwsC-KpgmiDwGo-ZcGH0tA + // navigate(routes.updatePassword({ recoveryToken: token })) client .recover(token, true) .then(() => { diff --git a/web/src/pages/UpdatePasswordPage/UpdatePasswordPage.js b/web/src/pages/UpdatePasswordPage/UpdatePasswordPage.js index 48008d1..d198ee0 100644 --- a/web/src/pages/UpdatePasswordPage/UpdatePasswordPage.js +++ b/web/src/pages/UpdatePasswordPage/UpdatePasswordPage.js @@ -11,7 +11,7 @@ const UpdatePasswordPage = () => { const { addMessage } = useFlash() const { client } = useAuth() const onSubmit = ({ password, confirm }) => { - if (password !== confirm || !password) { + if (password !== confirm) { addMessage("Passwords don't match, try again", { classes: 'bg-red-300 text-red-900', }) @@ -21,20 +21,24 @@ const UpdatePasswordPage = () => { .currentUser() .update({ password }) .then(() => { - addMessage('Password updated', { classes: 'rw-flash-success' }) + addMessage('Email updated', { classes: 'rw-flash-success' }) setTimeout(() => { navigate(routes.home()) }, 500) }) .catch(() => { - addMessage('Problem updating password', { + addMessage('Problem updating email', { classes: 'bg-red-300 text-red-900', }) }) } return ( - +

Reset Password

@@ -48,7 +52,7 @@ const UpdatePasswordPage = () => { {