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
| 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
| 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 { 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 { render } from 'react-dom'; | |
| import { Router, Route, IndexRoute, Link } from 'react-router' | |
| // Page Components, etc. | |
| import Navigation from './navigation.jsx'; | |
| import Home from './home.jsx'; | |
| const App = React.createClass({ |
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
| ProxyDisplay = React.createClass({ | |
| mixins: [ReactMeteorData], | |
| getMeteorData() { | |
| let data = {}; | |
| let names = _.pluck(this.props.proxyState, 'name'); | |
| let handle = Meteor.subscribe('cardsFromList', names); | |
| if (handle.ready()) { | |
| data.cards = Cards.find({}).fetch(); |
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
| componentDidMount() { | |
| $('.dropdown').dropdown({ | |
| on: 'hover' | |
| }); | |
| }, |
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
| App = React.createClass({ | |
| //mixins: [ReactMeteorData], | |
| // Initial State declared here. | |
| getInitialState() { | |
| return { | |
| deckState: null | |
| }; | |
| }, |
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
| <template name="layout"> | |
| <!-- Nav Menu --> | |
| {{> Template.dynamic template=nav}} | |
| <!-- Rest of page --> | |
| {{> Template.dynamic template=main}} | |
| </template> |
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
| var ownerId; | |
| Meteor.call("addPerson", personDoc, function(result) { | |
| ownerId = result; | |
| }); | |
| console.log(ownerId); |