This file contains 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 Component from 'react-pure-render/component'; | |
import React, {PropTypes} from 'react'; | |
export default class Header extends Component { | |
static propTypes = { | |
// ... | |
} | |
render() { |
This file contains 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 './theme.less'; | |
import Component from 'react-pure-render/component'; | |
import {Grid, Row, Col} from 'react-bootstrap'; | |
import Header from './Header.react'; | |
import Sidebar from './components/Sidebar.react'; | |
import React, {PropTypes} from 'react'; | |
import RouterHandler from '../../common/components/RouterHandler.react'; | |
import mapDispatchToProps from '../../common/app/mapDispatchToProps'; | |
import mapStateToProps from '../../common/app/mapStateToProps'; | |
import {connect} from 'react-redux'; |
This file contains 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.dashboard.onCreated(function() { | |
var instance = this; | |
instance.autorun(function() { | |
instance.subscribe('items'); | |
}); | |
}); | |
Template.dashboard.onRendered(function() { | |
Meteor.call('getClientToken', function(error, clientToken) { | |
if (error) { |
This file contains 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
// Define gateway variable | |
var gateway; | |
Meteor.startup(function () { | |
var env; | |
// Pick Braintree environment based on environment defined in Meteor settings. | |
if (Meteor.settings.public.env === 'Production') { | |
env = Braintree.Environment.Production; | |
} else { | |
env = Braintree.Environment.Sandbox; |
This file contains 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.dashboard.onCreated(function() { | |
var instance = this; | |
instance.autorun(function() { | |
instance.subscribe('items'); | |
}); | |
}); | |
Template.dashboard.onRendered(function() { | |
Meteor.call('getClientToken', function(error, clientToken) { | |
if (error) { |
This file contains 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="dashboard"> | |
<div class="template-dashboard"> | |
<div class="page-header"> | |
<h1>Dashboard</h1> | |
</div> | |
{{#if showForm}} | |
<h3>Buy access to our list of items!</h3> | |
<form role="form"> |
This file contains 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.dashboard.onCreated(function() { | |
var instance = this; | |
instance.autorun(function() { | |
instance.subscribe('items'); | |
}); | |
}); | |
Template.dashboard.helpers({ | |
items: function(){ | |
return Items.find(); |
This file contains 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="dashboard"> | |
<div class="template-dashboard"> | |
<div class="page-header"> | |
<h1>Dashboard</h1> | |
</div> | |
<ul class="list-group"> | |
{{#each items}} | |
<li class="list-group-item">{{ name }} <span class="label label-default">{{ rating }}</span></li> | |
{{/each}} |