This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { reduxForm } from 'redux-form'; | |
| // Fields | |
| const fields = ['username', 'email', 'emailAgain', 'password', 'passwordAgain']; | |
| // Validation Function | |
| const validate = values => { | |
| // Errors object is empty at first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { PropTypes } from 'react'; | |
| import { reduxForm } from 'redux-form'; | |
| // Fields | |
| const fields = ['username', 'email', 'emailAgain', 'password', 'passwordAgain']; | |
| // Validation Function | |
| const validate = values => { | |
| // Errors object is empty at first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { browserHistory } from 'react-router'; | |
| import { reduxForm } from 'redux-form'; | |
| // Fields for form | |
| const fields = ['user', 'password']; | |
| // Generate CSS for each field, based on error existence | |
| let fieldStyle = field => { | |
| if (field.touched && field.error) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let loginErrors = () => { | |
| if (store.getState().general.loginError) { | |
| return ( | |
| <div className="ui error message"> | |
| <div className="header">Login Error:</div> | |
| {store.getState().general.loginError} | |
| </div> | |
| ) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let loginErrors = () => { | |
| if (store.getState().general.loginError) { | |
| return ( | |
| <div className="ui error message"> | |
| <div className="header">Login Error:</div> | |
| {store.getState().general.loginError} | |
| </div> | |
| ) | |
| } else { | |
| return (<div>Blah.</div>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { browserHistory } from 'react-router'; | |
| import { reduxForm } from 'redux-form'; | |
| import store from '../store.jsx'; | |
| // Fields for form | |
| const fields = ['user', 'password']; | |
| // Generate CSS for each field, based on error existence | |
| let fieldStyle = field => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // React, etc. | |
| import React, { PropTypes } from 'react'; | |
| import { connect } from 'react-redux'; | |
| // Nav component | |
| import NavigationContainer from './navigation/navigation-container.jsx'; | |
| // ReactRedux Connection | |
| const mapStateToProps = (state) => { | |
| return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { reduxForm } from 'redux-form'; | |
| import Modal from 'react-modal'; | |
| import store from './store.jsx'; | |
| const style = { | |
| overlay: { | |
| position : 'fixed', | |
| top : 0, | |
| left : 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import Paper from 'material-ui/lib/paper'; | |
| import Toolbar from 'material-ui/lib/toolbar/toolbar'; | |
| import ToolbarGroup from 'material-ui/lib/toolbar/toolbar-group'; | |
| import ToolbarSeparator from 'material-ui/lib/toolbar/toolbar-separator'; | |
| import ToolbarTitle from 'material-ui/lib/toolbar/toolbar-title'; | |
| import FlatButton from 'material-ui/lib/flat-button'; | |
| let style = { | |
| paper: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Colors from 'material-ui/lib/styles/colors'; | |
| import Spacing from 'material-ui/lib/styles/spacing'; | |
| import zIndex from 'material-ui/lib/styles/zIndex'; | |
| import ColorManipulator from 'material-ui/lib/utils/color-manipulator'; | |
| export default { | |
| spacing: Spacing, | |
| zIndex: zIndex, | |
| fontFamily: 'Roboto, sans-serif', | |
| palette: { |