Coder Social home page Coder Social logo

Comments (2)

philcruz avatar philcruz commented on June 19, 2024 1

Sorry, I don't have a repo where you can test. I did figure out how to get around it. I found the code in std_accounts-ui.js where it was hanging up

  this.setState({ waiting: true });                                                                               // 604
                                                                                                                      //
      var SignUp = function () {                                                                                      // 606
        function SignUp(_options) {                                                                                   // 606
          var _this6 = this;                                                                                          // 606
                                                                                                                      //
          Accounts.createUser(_options, function (error) {                                                            // 607
            if (error) {                                                                                              // 608
              _this6.showMessage(T9n.get('error.accounts.' + error.reason) || T9n.get("Unknown error"), 'error');     // 609
              if (T9n.get('error.accounts.' + error.reason)) {                                                        // 610
                _this6.state.onSubmitHook('error.accounts.' + error.reason, formState);                               // 611
              } else {                                                                                                // 612
                _this6.state.onSubmitHook("Unknown error", formState);                                                // 614
              }                                                                                                       // 615
            } else {                                                                                                  // 616
              _this6.setState({                                                                                       // 618
                formState: STATES.PROFILE,                                                                            // 619
                message: null,                                                                                        // 620
                password: null                                                                                        // 621
              });                                                                                                     // 618
              var user = Accounts.user();                                                                             // 623
              loginResultCallback(_this6.state.onPostSignUpHook.bind(_this6, _options, user));                        // 624
            }                                                                                                         // 625
                                                                                                                      //
            _this6.setState({ waiting: false });                                                                      // 627
          });                                                                                                         // 628
        }     

I noticed the loginResultCallBack had onPostSignUpHook. I was trying to get familiar with the events so I was doing

    onPreSignUpHook: (options) => {
        console.log('preSignUpHook');
        console.log(options);
    },

When I removed that it worked fine.

from accounts-material-ui.

PolGuixe avatar PolGuixe commented on June 19, 2024

@philcruz do have a repo where I can test this issue?

also, could you try setting up the state?

import React, { Component } from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import { Accounts } from 'meteor/std:accounts-ui';
import {Card, CardActions, CardHeader, CardText} from 'material-ui/Card';
import Paper from 'material-ui/Paper';

import {STATES} from 'meteor/std:accounts-ui';


class Login extends Component {



    render() {
        const style = {
            width: 500,
        };
        return (
            <MuiThemeProvider>
                <Accounts.ui.LoginForm formState={STATES.SIGN_UP} />
            </MuiThemeProvider>

        );
    }
}

export default Login;

from accounts-material-ui.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.