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, { Component } from 'react' | |
import ReactDOM from 'react-dom' | |
import Components from '../modules/renderComponents' | |
class HomeComponent extends Component { | |
constructor(props) { | |
super(props) | |
} | |
render() { |
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 Header from './Global/Header' | |
import Footer from './Global/Footer' | |
export const Layout = ({content, classes, page}) => ( | |
<div className="app"> | |
<div> | |
<Header classes={classes} page={page} /> | |
</div> | |
<div className="container"> |
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
<Helmet | |
htmlAttributes={{"lang": "en", "amp": undefined}} // amp takes no value | |
title="testing" | |
link={[ | |
{"rel": "icon", "href": "favicon.png"} | |
]} | |
/> |
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, Component} from 'react' | |
import Formsy from 'formsy-react' | |
import Input from './Input' | |
class Home extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
canSubmit: false | |
} |
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 Formsy from 'formsy-react' | |
const Input = React.createClass({ | |
mixins: [Formsy.Mixin], | |
changeValue(event) { | |
this.setValue(event.currentTarget.value) | |
}, | |
render() { | |
const className = this.showRequired() ? 'required' : this.showError() ? 'error' : 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
'use strict' | |
const Mailchimp = require("mailchimp-api-v3"); | |
const mailchimp = new Mailchimp(process.env.MAILCHIMP_API); | |
exports.register = (server, options, next) => { | |
const postMailChimp = (request, reply) => { | |
let object = JSON.parse(request.payload) | |
mailchimp.post('/lists/########/members', { |
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
{ | |
"plugins": { | |
"mailchimp": { | |
"module": "./server/plugins/mailchimp" | |
} | |
} | |
} |
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
{ | |
"name": "electron-auth0-react", | |
"version": "1.0.0", | |
"description": "Electron starter with React and Basic Authentication with Auth0", | |
"main": "main.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"start": "ENV=development electron .", | |
"watch": "webpack-dev-server", | |
"electron-rebuild": "electron-rebuild", |
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
// webpack.config.js | |
var path = require('path'); | |
var webpack = require('webpack'); | |
var config = { | |
context: __dirname + '/src', | |
entry: { | |
app: ['webpack/hot/dev-server', './app.js'] | |
}, | |
output: { | |
path: path.resolve(__dirname, 'build'), |
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
<!-- index.html --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Electron React Auth Starter</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script> | |
(function() { |