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 Flickity from 'flickity'; | |
import API from '../api/prismic'; | |
import Helper from '../helper'; | |
class Product extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { |
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 { render } from 'react-dom'; | |
// Pages | |
import Home from './pages/home'; | |
import Product from './pages/product'; | |
class HomeLayout extends Component { | |
render() { | |
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, { Component } from 'react'; | |
import API from '../api/prismic'; | |
import Carousel from '../globals/carousel' | |
import Helper from '../helper'; | |
class Home extends Component { | |
constructor(props) { | |
super(props) |
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 { render } from 'react-dom'; | |
// Pages | |
import Home from './pages/home'; | |
if (document.getElementById('Home')) { // eslint-disable-line | |
render(<HomeLayout />, | |
document.getElementById('Home') // eslint-disable-line | |
); |
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
const Prismic = require('prismic.io'); | |
const endpoint = 'https://yourrepo.prismic.io/api'; | |
const CMS = Prismic.api(endpoint); | |
const cursor = Prismic.Predicates; | |
class API { | |
query(key, value) { | |
return CMS.then((api) => { | |
return api.query(cursor.at(key, value)); |
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
this.lock = new Auth0Lock(clientId, domain, { | |
auth: { | |
redirect: false, | |
sso: 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
let Config = {} | |
Config = { | |
"auth" : [ | |
{ | |
key: '', | |
domain: '' | |
} | |
] | |
} |
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, PropTypes as T} from 'react' | |
import AuthService from '../../../utils/AuthService' | |
import { Link } from 'react-router' | |
export default class Login extends Component { | |
render() { | |
const { auth } = this.props | |
return ( | |
<div className="login"> | |
<h2>Login</h2> |
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 { Link } from 'react-router' | |
import AuthService from '../../utils/AuthService' | |
export default class Home extends Component { | |
constructor(props, context) { | |
super(props, context) | |
this.state = { | |
profile: props.auth.getProfile() | |
} |
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' | |
export default class Layout extends Component { | |
constructor(props) { | |
super(props) | |
} | |
render() { | |
let children = null; | |
if (this.props.children) { | |
children = React.cloneElement(this.props.children, { |