var SignupForm = require('./signup.js').SignupForm; var SigninForm = require('./signin.js').SigninForm; var OtpEnrollForm = require('./otp.js').OtpEnrollForm; var PoloniexForm = require('./poloniex.js').PoloniexForm; var App = require('./app.js'); var Api = require('./api.js').Api; var cookies = require('./cookies.js'); var Logo = React.createClass({ render: function() { return (); } }); App.page('/signup', false, function(context) { if (App.isUserSignedIn()) { App.go('/me'); return; } App.mount(
); }); App.page('/signin', false, function(context) { if (App.isUserSignedIn()) { App.go('/me'); return; } App.mount(
); }); App.page('/signout', true, function(context) { cookies.removeItem('jwt'); App.go('/'); }); App.page('/me', true, function(context) { Api.Call('MARKET', {'name': 'poloniex'}, function(err, status, data) { if (err) { console.error(err, data); return; } App.mount(

Poloniex

); }.bind(this)); }); App.page('/otp/setup', true, function(context) { Api.Call('OTP_ENROLL', {}, function(err, status, data) { if (err) { console.error(err, data); return; } App.mount(
); }.bind(this)); }); App.page('/otp/validate', true, function(context) { App.mount(
); }); App.page('/', false, function(context) { App.go('/me'); }); $(document).ready(function() { App.start(); });